org.apache.hadoop.hive.ql.parse
Class SemanticAnalyzer

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
      extended by org.apache.hadoop.hive.ql.parse.SemanticAnalyzer

public class SemanticAnalyzer
extends BaseSemanticAnalyzer

Implementation of the semantic analyzer


Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
BaseSemanticAnalyzer.tableSpec
 
Field Summary
 
Fields inherited from class org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
conf, console, ctx, db, fetchTask, fetchTaskInit, idToTableNameMap, LOG, rootTasks
 
Constructor Summary
SemanticAnalyzer(HiveConf conf)
           
 
Method Summary
 void analyzeInternal(ASTNode ast)
           
static ArrayList<exprNodeDesc> convertParameters(Method m, List<exprNodeDesc> parametersPassed)
           
 void doPhase1(ASTNode ast, QB qb, org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx ctx_1)
           
 void doPhase1QBExpr(ASTNode ast, QBExpr qbexpr, String id, String alias)
           
static exprNodeDesc genExprNodeDesc(ASTNode expr, RowResolver input)
          Generates and expression node descriptor for the expression passed in the arguments.
 Operator genPlan(QB qb)
           
static String getColumnInternalName(int pos)
           
 Set<ReadEntity> getInputs()
           
 void getMetaData(QB qb)
           
 Set<WriteEntity> getOutputs()
           
 ParseContext getParseContext()
           
 void init(ParseContext pctx)
           
 org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx initPhase1Ctx()
           
<T extends Serializable>
Operator<T>
putOpInsertMap(Operator<T> op, RowResolver rr)
           
protected  void reset()
           
 void validate()
           
 
Methods inherited from class org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
analyze, charSetString, getFetchTask, getFetchTaskInit, getIdToTableNameMap, getRootTasks, setFetchTask, setFetchTaskInit, stripQuotes, unescapeIdentifier, unescapeSQLString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemanticAnalyzer

public SemanticAnalyzer(HiveConf conf)
                 throws SemanticException
Throws:
SemanticException
Method Detail

reset

protected void reset()
Overrides:
reset in class BaseSemanticAnalyzer

init

public void init(ParseContext pctx)

getParseContext

public ParseContext getParseContext()

doPhase1QBExpr

public void doPhase1QBExpr(ASTNode ast,
                           QBExpr qbexpr,
                           String id,
                           String alias)
                    throws SemanticException
Throws:
SemanticException

doPhase1

public void doPhase1(ASTNode ast,
                     QB qb,
                     org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx ctx_1)
              throws SemanticException
Throws:
SemanticException

getMetaData

public void getMetaData(QB qb)
                 throws SemanticException
Throws:
SemanticException

putOpInsertMap

public <T extends Serializable> Operator<T> putOpInsertMap(Operator<T> op,
                                                           RowResolver rr)

getColumnInternalName

public static String getColumnInternalName(int pos)

genPlan

public Operator genPlan(QB qb)
                 throws SemanticException
Throws:
SemanticException

initPhase1Ctx

public org.apache.hadoop.hive.ql.parse.SemanticAnalyzer.Phase1Ctx initPhase1Ctx()

analyzeInternal

public void analyzeInternal(ASTNode ast)
                     throws SemanticException
Specified by:
analyzeInternal in class BaseSemanticAnalyzer
Throws:
SemanticException

genExprNodeDesc

public static exprNodeDesc genExprNodeDesc(ASTNode expr,
                                           RowResolver input)
                                    throws SemanticException
Generates and expression node descriptor for the expression passed in the arguments. This function uses the row resolver and the metadata informatinon that are passed as arguments to resolve the column names to internal names.

Parameters:
expr - The expression
input - The row resolver
Returns:
exprNodeDesc
Throws:
SemanticException

convertParameters

public static ArrayList<exprNodeDesc> convertParameters(Method m,
                                                        List<exprNodeDesc> parametersPassed)

validate

public void validate()
              throws SemanticException
Overrides:
validate in class BaseSemanticAnalyzer
Throws:
SemanticException

getInputs

public Set<ReadEntity> getInputs()
Overrides:
getInputs in class BaseSemanticAnalyzer

getOutputs

public Set<WriteEntity> getOutputs()
Overrides:
getOutputs in class BaseSemanticAnalyzer


Copyright © 2009 The Apache Software Foundation