org.apache.hadoop.hive.ql.parse
Class BaseSemanticAnalyzer
java.lang.Object
org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
- Direct Known Subclasses:
- DDLSemanticAnalyzer, ExplainSemanticAnalyzer, FunctionSemanticAnalyzer, LoadSemanticAnalyzer, SemanticAnalyzer
public abstract class BaseSemanticAnalyzer
- extends Object
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
db
protected final Hive db
conf
protected final HiveConf conf
rootTasks
protected List<Task<? extends Serializable>> rootTasks
fetchTask
protected Task<? extends Serializable> fetchTask
fetchTaskInit
protected boolean fetchTaskInit
LOG
protected final org.apache.commons.logging.Log LOG
console
protected final SessionState.LogHelper console
ctx
protected Context ctx
idToTableNameMap
protected HashMap<String,String> idToTableNameMap
inputs
protected Set<ReadEntity> inputs
- ReadEntitites that are passed to the hooks.
outputs
protected Set<WriteEntity> outputs
- List of WriteEntities that are passed to the hooks.
TEXTFILE_INPUT
protected static final String TEXTFILE_INPUT
TEXTFILE_OUTPUT
protected static final String TEXTFILE_OUTPUT
SEQUENCEFILE_INPUT
protected static final String SEQUENCEFILE_INPUT
SEQUENCEFILE_OUTPUT
protected static final String SEQUENCEFILE_OUTPUT
RCFILE_INPUT
protected static final String RCFILE_INPUT
RCFILE_OUTPUT
protected static final String RCFILE_OUTPUT
COLUMNAR_SERDE
protected static final String COLUMNAR_SERDE
BaseSemanticAnalyzer
public BaseSemanticAnalyzer(HiveConf conf)
throws SemanticException
- Throws:
SemanticException
getIdToTableNameMap
public HashMap<String,String> getIdToTableNameMap()
analyzeInternal
public abstract void analyzeInternal(ASTNode ast)
throws SemanticException
- Throws:
SemanticException
analyze
public void analyze(ASTNode ast,
Context ctx)
throws SemanticException
- Throws:
SemanticException
validate
public void validate()
throws SemanticException
- Throws:
SemanticException
getRootTasks
public List<Task<? extends Serializable>> getRootTasks()
getFetchTask
public Task<? extends Serializable> getFetchTask()
- Returns:
- the fetchTask
setFetchTask
public void setFetchTask(Task<? extends Serializable> fetchTask)
- Parameters:
fetchTask
- the fetchTask to set
getFetchTaskInit
public boolean getFetchTaskInit()
setFetchTaskInit
public void setFetchTaskInit(boolean fetchTaskInit)
reset
protected void reset()
stripQuotes
public static String stripQuotes(String val)
throws SemanticException
- Throws:
SemanticException
charSetString
public static String charSetString(String charSetName,
String charSetString)
throws SemanticException
- Throws:
SemanticException
unescapeIdentifier
public static String unescapeIdentifier(String val)
- Remove the encapsulating "`" pair from the identifier.
We allow users to use "`" to escape identifier for table names,
column names and aliases, in case that coincide with Hive language
keywords.
unescapeSQLString
public static String unescapeSQLString(String b)
getInputs
public Set<ReadEntity> getInputs()
getOutputs
public Set<WriteEntity> getOutputs()
getColumns
protected List<FieldSchema> getColumns(ASTNode ast)
throws SemanticException
- Get the list of FieldSchema out of the ASTNode.
- Throws:
SemanticException
getColumnNames
protected List<String> getColumnNames(ASTNode ast)
getColumnNamesOrder
protected List<Order> getColumnNamesOrder(ASTNode ast)
getTypeStringFromAST
protected static String getTypeStringFromAST(ASTNode typeNode)
throws SemanticException
- Throws:
SemanticException
Copyright © 2009 The Apache Software Foundation