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

java.lang.Object
  extended by org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
Direct Known Subclasses:
DDLSemanticAnalyzer, ExplainSemanticAnalyzer, FunctionSemanticAnalyzer, LoadSemanticAnalyzer, SemanticAnalyzer

public abstract class BaseSemanticAnalyzer
extends Object


Nested Class Summary
static class BaseSemanticAnalyzer.tableSpec
           
 
Field Summary
protected  HiveConf conf
           
protected  SessionState.LogHelper console
           
protected  Context ctx
           
protected  Hive db
           
protected  Task<? extends Serializable> fetchTask
           
protected  boolean fetchTaskInit
           
protected  HashMap<String,String> idToTableNameMap
           
protected  org.apache.commons.logging.Log LOG
           
protected  List<Task<? extends Serializable>> rootTasks
           
 
Constructor Summary
BaseSemanticAnalyzer(HiveConf conf)
           
 
Method Summary
 void analyze(ASTNode ast, Context ctx)
           
abstract  void analyzeInternal(ASTNode ast)
           
static String charSetString(String charSetName, String charSetString)
           
 Task<? extends Serializable> getFetchTask()
           
 boolean getFetchTaskInit()
           
 HashMap<String,String> getIdToTableNameMap()
           
 Set<ReadEntity> getInputs()
           
 Set<WriteEntity> getOutputs()
           
 List<Task<? extends Serializable>> getRootTasks()
           
protected  void reset()
           
 void setFetchTask(Task<? extends Serializable> fetchTask)
           
 void setFetchTaskInit(boolean fetchTaskInit)
           
static String stripQuotes(String val)
           
static String unescapeIdentifier(String val)
          Remove the encapsulating "`" pair from the identifier.
static String unescapeSQLString(String b)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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
Constructor Detail

BaseSemanticAnalyzer

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

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()


Copyright © 2009 The Apache Software Foundation