public class SemanticAnalyzer extends BaseSemanticAnalyzer
BaseSemanticAnalyzer.tableSpec| Modifier and Type | Field and Description |
|---|---|
protected boolean |
noscan |
protected boolean |
partialscan |
columnAccessInfo, conf, console, ctx, db, fetchTask, HIVE_COLUMN_ORDER_ASC, HIVE_COLUMN_ORDER_DESC, idToTableNameMap, inputs, linfo, LOG, ORCFILE_INPUT, ORCFILE_OUTPUT, ORCFILE_SERDE, outputs, queryProperties, RCFILE_INPUT, RCFILE_OUTPUT, rootTasks, SEQUENCEFILE_INPUT, SEQUENCEFILE_OUTPUT, tableAccessInfo, TEXTFILE_INPUT, TEXTFILE_OUTPUT| Constructor and Description |
|---|
SemanticAnalyzer(HiveConf conf) |
| Modifier and Type | Method and Description |
|---|---|
void |
analyzeInternal(ASTNode ast) |
boolean |
doPhase1(ASTNode ast,
QB qb,
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx ctx_1)
Phase 1: (including, but not limited to):
1.
|
void |
doPhase1QBExpr(ASTNode ast,
QBExpr qbexpr,
java.lang.String id,
java.lang.String alias) |
java.util.Map<ASTNode,ExprNodeDesc> |
genAllExprNodeDesc(ASTNode expr,
RowResolver input)
Generates an expression node descriptors for the expression and children of it
with default TypeCheckCtx.
|
java.util.Map<ASTNode,ExprNodeDesc> |
genAllExprNodeDesc(ASTNode expr,
RowResolver input,
TypeCheckCtx tcCtx)
Generates all of the expression node descriptors for the expression and children of it
passed in the arguments.
|
static java.lang.String |
generateErrorMessage(ASTNode ast,
java.lang.String message) |
ExprNodeDesc |
genExprNodeDesc(ASTNode expr,
RowResolver input)
Generates an expression node descriptor for the expression with TypeCheckCtx.
|
ExprNodeDesc |
genExprNodeDesc(ASTNode expr,
RowResolver input,
TypeCheckCtx tcCtx)
Returns expression node descriptor for the expression.
|
Operator |
genPlan(QB qb) |
static java.lang.String |
getColumnInternalName(int pos) |
void |
getMetaData(QB qb) |
void |
getMetaData(QB qb,
ReadEntity parentInput) |
ParseContext |
getParseContext() |
QB |
getQB() |
java.util.List<FieldSchema> |
getResultSchema() |
RowResolver |
getRowResolver(Operator opt)
Get the row resolver given an operator.
|
void |
init() |
void |
initParseCtx(ParseContext pctx) |
org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx |
initPhase1Ctx() |
static java.util.ArrayList<WindowingSpec.WindowExpressionSpec> |
parseSelect(java.lang.String selectExprStr) |
protected void |
processNoScanCommand(ASTNode tree)
process analyze ...
|
protected void |
processPartialScanCommand(ASTNode tree)
process analyze ...
|
<T extends OperatorDesc> |
putOpInsertMap(Operator<T> op,
RowResolver rr) |
protected void |
reset() |
void |
setQB(QB qb) |
void |
validate() |
analyze, analyzeDDLSkewedValues, analyzeSkewedTablDDLColNames, analyzeStoredAdDirs, charSetString, constructListBucketingCtx, extractPartitionSpecs, getColumnAccessInfo, getColumnNames, getColumnNamesOrder, getColumns, getColumns, getDb, getFetchTask, getIdToTableNameMap, getInputs, getLineageInfo, getOutputs, getQueryProperties, getRootTasks, getSkewedValueFromASTNode, getSkewedValuesFromASTNode, getTableAccessInfo, getTypeStringFromAST, getUnescapedName, getUnescapedName, getUnescapedUnqualifiedTableName, handleGenericFileFormat, initCtx, isValidPrefixSpec, readProps, setColumnAccessInfo, setFetchTask, setLineageInfo, setTableAccessInfo, stripIdentifierQuotes, stripQuotes, unescapeIdentifier, unescapeSQLString, validatePartSpecpublic SemanticAnalyzer(HiveConf conf) throws SemanticException
SemanticExceptionprotected void reset()
reset in class BaseSemanticAnalyzerpublic void initParseCtx(ParseContext pctx)
public ParseContext getParseContext()
public void doPhase1QBExpr(ASTNode ast, QBExpr qbexpr, java.lang.String id, java.lang.String alias) throws SemanticException
SemanticExceptionpublic static java.lang.String generateErrorMessage(ASTNode ast, java.lang.String message)
public boolean doPhase1(ASTNode ast, QB qb, org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx ctx_1) throws SemanticException
ast - qb - ctx_1 - SemanticExceptionpublic void getMetaData(QB qb) throws SemanticException
SemanticExceptionpublic void getMetaData(QB qb, ReadEntity parentInput) throws SemanticException
SemanticExceptionpublic <T extends OperatorDesc> Operator<T> putOpInsertMap(Operator<T> op, RowResolver rr)
public static java.lang.String getColumnInternalName(int pos)
public Operator genPlan(QB qb) throws SemanticException
SemanticExceptionpublic org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx initPhase1Ctx()
public void init()
init in class BaseSemanticAnalyzerpublic void analyzeInternal(ASTNode ast) throws SemanticException
analyzeInternal in class BaseSemanticAnalyzerSemanticExceptionpublic java.util.List<FieldSchema> getResultSchema()
getResultSchema in class BaseSemanticAnalyzerpublic ExprNodeDesc genExprNodeDesc(ASTNode expr, RowResolver input) throws SemanticException
SemanticExceptionpublic java.util.Map<ASTNode,ExprNodeDesc> genAllExprNodeDesc(ASTNode expr, RowResolver input) throws SemanticException
SemanticExceptionpublic ExprNodeDesc genExprNodeDesc(ASTNode expr, RowResolver input, TypeCheckCtx tcCtx) throws SemanticException
SemanticExceptionpublic java.util.Map<ASTNode,ExprNodeDesc> genAllExprNodeDesc(ASTNode expr, RowResolver input, TypeCheckCtx tcCtx) throws SemanticException
expr - The expressioninput - The row resolvertcCtx - Customized type-checking contextSemanticException - Failed to evaluate expressionpublic void validate()
throws SemanticException
validate in class BaseSemanticAnalyzerSemanticExceptionpublic RowResolver getRowResolver(Operator opt)
protected void processPartialScanCommand(ASTNode tree) throws SemanticException
tree - SemanticExceptionprotected void processNoScanCommand(ASTNode tree) throws SemanticException
tree - SemanticExceptionpublic QB getQB()
public void setQB(QB qb)
public static java.util.ArrayList<WindowingSpec.WindowExpressionSpec> parseSelect(java.lang.String selectExprStr) throws SemanticException
SemanticExceptionCopyright © 2012 The Apache Software Foundation