|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.hive.ql.parse.BaseSemanticAnalyzer
public abstract class BaseSemanticAnalyzer
BaseSemanticAnalyzer.
Nested Class Summary | |
---|---|
static class |
BaseSemanticAnalyzer.tableSpec
tableSpec. |
Field Summary | |
---|---|
static int |
HIVE_COLUMN_ORDER_ASC
|
static int |
HIVE_COLUMN_ORDER_DESC
|
Constructor Summary | |
---|---|
BaseSemanticAnalyzer(HiveConf conf)
|
|
BaseSemanticAnalyzer(HiveConf conf,
Hive db)
|
Method Summary | |
---|---|
void |
analyze(ASTNode ast,
Context ctx)
|
abstract void |
analyzeInternal(ASTNode ast)
|
static String |
charSetString(String charSetName,
String charSetString)
|
ColumnAccessInfo |
getColumnAccessInfo()
Gets the column access information. |
static List<String> |
getColumnNames(ASTNode ast)
|
static List<org.apache.hadoop.hive.metastore.api.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<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getResultSchema()
|
List<Task<? extends Serializable>> |
getRootTasks()
|
TableAccessInfo |
getTableAccessInfo()
Gets the table access information. |
static String |
getUnescapedName(ASTNode tableOrColumnNode)
Get dequoted name from a table/column node. |
static String |
getUnescapedName(ASTNode tableOrColumnNode,
String currentDatabase)
|
static String |
getUnescapedUnqualifiedTableName(ASTNode node)
Get the unqualified name from a table node. |
void |
init()
|
void |
initCtx(Context ctx)
|
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. |
void |
setColumnAccessInfo(ColumnAccessInfo columnAccessInfo)
Sets the column access information. |
void |
setFetchTask(FetchTask fetchTask)
|
void |
setLineageInfo(LineageInfo linfo)
Sets the lineage information. |
void |
setTableAccessInfo(TableAccessInfo tableAccessInfo)
Sets the table access information. |
static String |
stripIdentifierQuotes(String val)
|
static String |
stripQuotes(String val)
|
static String |
unescapeIdentifier(String val)
Remove the encapsulating "`" pair from the identifier. |
static String |
unescapeSQLString(String b)
|
void |
validate()
|
static void |
validatePartSpec(Table tbl,
Map<String,String> partSpec,
ASTNode astNode,
HiveConf conf,
boolean shouldBeFull)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int HIVE_COLUMN_ORDER_ASC
public static int HIVE_COLUMN_ORDER_DESC
Constructor Detail |
---|
public BaseSemanticAnalyzer(HiveConf conf) throws SemanticException
SemanticException
public BaseSemanticAnalyzer(HiveConf conf, Hive db) throws SemanticException
SemanticException
Method Detail |
---|
public HashMap<String,String> getIdToTableNameMap()
public abstract void analyzeInternal(ASTNode ast) throws SemanticException
SemanticException
public void init()
public void initCtx(Context ctx)
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 setpublic static String stripIdentifierQuotes(String val)
public static String stripQuotes(String val)
public static String charSetString(String charSetName, String charSetString) throws SemanticException
SemanticException
public static String getUnescapedName(ASTNode tableOrColumnNode)
tableOrColumnNode
- the table or column node
public static String getUnescapedName(ASTNode tableOrColumnNode, String currentDatabase)
public static String getUnescapedUnqualifiedTableName(ASTNode node)
node
- 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<org.apache.hadoop.hive.metastore.api.FieldSchema> getResultSchema()
public static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColumns(ASTNode ast, boolean lowerCase) throws SemanticException
SemanticException
public static List<String> getColumnNames(ASTNode ast)
public LineageInfo getLineageInfo()
public void setLineageInfo(LineageInfo linfo)
linfo
- The LineageInfo structure that is set in the optimization phase.public TableAccessInfo getTableAccessInfo()
public void setTableAccessInfo(TableAccessInfo tableAccessInfo)
taInfo
- The TableAccessInfo structure that is set in the optimization phase.public ColumnAccessInfo getColumnAccessInfo()
public void setColumnAccessInfo(ColumnAccessInfo columnAccessInfo)
columnAccessInfo
- The ColumnAccessInfo structure that is set immediately after
the optimization phase.public final boolean isValidPrefixSpec(Table tTable, Map<String,String> spec) throws HiveException
spec
- specification key-value map
HiveException
public Hive getDb()
public QueryProperties getQueryProperties()
public static void validatePartSpec(Table tbl, Map<String,String> partSpec, ASTNode astNode, HiveConf conf, boolean shouldBeFull) throws SemanticException
SemanticException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |