|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
public abstract class BaseSemanticAnalyzer
BaseSemanticAnalyzer.
Nested Class Summary | |
---|---|
static class |
BaseSemanticAnalyzer.tableSpec
tableSpec. |
Field Summary | |
---|---|
protected static String |
COLUMNAR_SERDE
|
protected HiveConf |
conf
|
protected SessionState.LogHelper |
console
|
protected Context |
ctx
|
protected Hive |
db
|
protected FetchTask |
fetchTask
|
static int |
HIVE_COLUMN_ORDER_ASC
|
static int |
HIVE_COLUMN_ORDER_DESC
|
protected HashMap<String,String> |
idToTableNameMap
|
protected HashSet<ReadEntity> |
inputs
ReadEntitites that are passed to the hooks. |
protected LineageInfo |
linfo
Lineage information for the query. |
protected org.apache.commons.logging.Log |
LOG
|
protected HashSet<WriteEntity> |
outputs
List of WriteEntities that are passed to the hooks. |
protected QueryProperties |
queryProperties
|
protected static String |
RCFILE_INPUT
|
protected static String |
RCFILE_OUTPUT
|
protected List<Task<? extends Serializable>> |
rootTasks
|
protected static String |
SEQUENCEFILE_INPUT
|
protected static String |
SEQUENCEFILE_OUTPUT
|
protected static String |
TEXTFILE_INPUT
|
protected static String |
TEXTFILE_OUTPUT
|
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)
|
protected HashMap<String,String> |
extractPartitionSpecs(org.antlr.runtime.tree.Tree partspec)
|
protected List<String> |
getColumnNames(ASTNode ast)
|
protected List<Order> |
getColumnNamesOrder(ASTNode ast)
|
protected List<FieldSchema> |
getColumns(ASTNode ast)
|
static List<FieldSchema> |
getColumns(ASTNode ast,
boolean lowerCase)
Get the list of FieldSchema out of the ASTNode. |
Hive |
getDb()
|
FetchTask |
getFetchTask()
|
HashMap<String,String> |
getIdToTableNameMap()
|
HashSet<ReadEntity> |
getInputs()
|
LineageInfo |
getLineageInfo()
Gets the lineage information. |
HashSet<WriteEntity> |
getOutputs()
|
QueryProperties |
getQueryProperties()
|
List<FieldSchema> |
getResultSchema()
|
List<Task<? extends Serializable>> |
getRootTasks()
|
protected static String |
getTypeStringFromAST(ASTNode typeNode)
|
static String |
getUnescapedName(ASTNode tableNameNode)
Get the name from a table node. |
protected void |
handleGenericFileFormat(ASTNode node)
|
boolean |
isValidPrefixSpec(Table tTable,
Map<String,String> spec)
Checks if given specification is proper specification for prefix of partition cols, for table partitioned by ds, hr, min valid ones are (ds='2008-04-08'), (ds='2008-04-08', hr='12'), (ds='2008-04-08', hr='12', min='30') invalid one is for example (ds='2008-04-08', min='30') |
static void |
readProps(ASTNode prop,
Map<String,String> mapProp)
Converts parsed key/value properties pairs into a map. |
protected void |
reset()
|
void |
setFetchTask(FetchTask fetchTask)
|
void |
setLineageInfo(LineageInfo linfo)
Sets the lineage information. |
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 |
---|
protected final Hive db
protected final HiveConf conf
protected List<Task<? extends Serializable>> rootTasks
protected FetchTask fetchTask
protected final org.apache.commons.logging.Log LOG
protected final SessionState.LogHelper console
protected Context ctx
protected HashMap<String,String> idToTableNameMap
protected QueryProperties queryProperties
public static int HIVE_COLUMN_ORDER_ASC
public static int HIVE_COLUMN_ORDER_DESC
protected HashSet<ReadEntity> inputs
protected HashSet<WriteEntity> outputs
protected LineageInfo linfo
protected static final String TEXTFILE_INPUT
protected static final String TEXTFILE_OUTPUT
protected static final String SEQUENCEFILE_INPUT
protected static final String SEQUENCEFILE_OUTPUT
protected static final String RCFILE_INPUT
protected static final String RCFILE_OUTPUT
protected static final String COLUMNAR_SERDE
Constructor Detail |
---|
public BaseSemanticAnalyzer(HiveConf conf) throws SemanticException
SemanticException
Method Detail |
---|
public HashMap<String,String> getIdToTableNameMap()
public abstract void analyzeInternal(ASTNode ast) throws SemanticException
SemanticException
public void analyze(ASTNode ast, Context ctx) throws SemanticException
SemanticException
public void validate() throws SemanticException
SemanticException
public List<Task<? extends Serializable>> getRootTasks()
public FetchTask getFetchTask()
public void setFetchTask(FetchTask fetchTask)
fetchTask
- the fetchTask to setprotected void reset()
public static String stripQuotes(String val) throws SemanticException
SemanticException
public static String charSetString(String charSetName, String charSetString) throws SemanticException
SemanticException
public static String getUnescapedName(ASTNode tableNameNode)
tableNameNode
- the table node
public static String unescapeIdentifier(String val)
public static void readProps(ASTNode prop, Map<String,String> mapProp)
prop
- ASTNode parent of the key/value pairsmapProp
- property map which receives the mappingspublic static String unescapeSQLString(String b)
public HashSet<ReadEntity> getInputs()
public HashSet<WriteEntity> getOutputs()
public List<FieldSchema> getResultSchema()
protected List<FieldSchema> getColumns(ASTNode ast) throws SemanticException
SemanticException
protected void handleGenericFileFormat(ASTNode node) throws SemanticException
SemanticException
public static List<FieldSchema> getColumns(ASTNode ast, boolean lowerCase) throws SemanticException
SemanticException
protected List<String> getColumnNames(ASTNode ast)
protected List<Order> getColumnNamesOrder(ASTNode ast)
protected static String getTypeStringFromAST(ASTNode typeNode) throws SemanticException
SemanticException
public LineageInfo getLineageInfo()
public void setLineageInfo(LineageInfo linfo)
linfo
- The LineageInfo structure that is set in the optimization phase.protected HashMap<String,String> extractPartitionSpecs(org.antlr.runtime.tree.Tree partspec) throws SemanticException
SemanticException
public final boolean isValidPrefixSpec(Table tTable, Map<String,String> spec) throws HiveException
spec
- specification key-value map
HiveException
public Hive getDb()
public QueryProperties getQueryProperties()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |