public class HiveParserBaseSemanticAnalyzer extends Object
Modifier and Type | Class and Description |
---|---|
static class |
HiveParserBaseSemanticAnalyzer.AggInfo
Counterpart of hive's CalcitePlanner.AggInfo.
|
static class |
HiveParserBaseSemanticAnalyzer.AnalyzeRewriteContext
Counterpart of hive's BaseSemanticAnalyzer.AnalyzeRewriteContext.
|
static class |
HiveParserBaseSemanticAnalyzer.GenericUDAFInfo
Counterpart of hive's SemanticAnalyzer.GenericUDAFInfo.
|
static class |
HiveParserBaseSemanticAnalyzer.HiveParserRowFormatParams
Counterpart of hive's BaseSemanticAnalyzer.RowFormatParams.
|
static class |
HiveParserBaseSemanticAnalyzer.NotNullConstraint
Counterpart of hive's SQLNotNullConstraint.
|
static class |
HiveParserBaseSemanticAnalyzer.Phase1Ctx
Counterpart of hive's SemanticAnalyzer.Phase1Ctx.
|
static class |
HiveParserBaseSemanticAnalyzer.PrimaryKey
Counterpart of hive's SQLPrimaryKey.
|
static class |
HiveParserBaseSemanticAnalyzer.TableSpec
Counterpart of hive's BaseSemanticAnalyzer.TableSpec.
|
static class |
HiveParserBaseSemanticAnalyzer.TableType
Counterpart of hive's CalcitePlanner.TableType.
|
Modifier and Type | Method and Description |
---|---|
static void |
addToGBExpr(HiveParserRowResolver groupByOutputRowResolver,
HiveParserRowResolver groupByInputRowResolver,
HiveParserASTNode grpbyExpr,
org.apache.hadoop.hive.ql.plan.ExprNodeDesc grpbyExprNDesc,
List<org.apache.hadoop.hive.ql.plan.ExprNodeDesc> gbExprNDescLst,
List<String> outputColumnNames) |
static Map<String,Integer> |
buildHiveColNameToInputPosMap(List<org.apache.hadoop.hive.ql.plan.ExprNodeDesc> colList,
HiveParserRowResolver inputRR) |
static Map<String,Integer> |
buildHiveToCalciteColumnMap(HiveParserRowResolver rr) |
static Tuple2<String,String> |
charSetString(String charSetName,
String charSetString) |
static org.apache.calcite.util.ImmutableBitSet |
convert(int value,
int length) |
static org.apache.calcite.rel.RelNode |
genValues(String tabAlias,
org.apache.hadoop.hive.ql.metadata.Table tmpTable,
HiveParserRowResolver rowResolver,
org.apache.calcite.plan.RelOptCluster cluster,
List<List<String>> values) |
static org.apache.calcite.rex.RexWindowBound |
getBound(HiveParserWindowingSpec.BoundarySpec spec,
org.apache.calcite.plan.RelOptCluster cluster) |
static String |
getColumnInternalName(int pos) |
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getColumns(HiveParserASTNode ast) |
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getColumns(HiveParserASTNode ast,
boolean lowerCase) |
static List<org.apache.hadoop.hive.metastore.api.FieldSchema> |
getColumns(HiveParserASTNode ast,
boolean lowerCase,
List<HiveParserBaseSemanticAnalyzer.PrimaryKey> primaryKeys,
List<HiveParserBaseSemanticAnalyzer.NotNullConstraint> notNulls) |
static org.apache.calcite.util.Pair<List<org.apache.calcite.rel.core.CorrelationId>,org.apache.calcite.util.ImmutableBitSet> |
getCorrelationUse(org.apache.calcite.rex.RexCall call) |
static Map.Entry<String,String> |
getDbTableNamePair(HiveParserASTNode tableNameNode) |
static String |
getDotName(String[] qname) |
static List<HiveParserASTNode> |
getGroupByForClause(HiveParserQBParseInfo parseInfo,
String dest) |
static List<Integer> |
getGroupingSets(List<HiveParserASTNode> groupByExpr,
HiveParserQBParseInfo parseInfo,
String dest) |
static List<Integer> |
getGroupingSetsForCube(int size) |
static List<Integer> |
getGroupingSetsForRollup(int size) |
static HiveParserBaseSemanticAnalyzer.AggInfo |
getHiveAggInfo(HiveParserASTNode aggAst,
int aggFnLstArgIndx,
HiveParserRowResolver inputRR,
HiveParserWindowingSpec.WindowFunctionSpec winFuncSpec,
HiveParserSemanticAnalyzer semanticAnalyzer,
org.apache.calcite.tools.FrameworkConfig frameworkConfig,
org.apache.calcite.plan.RelOptCluster cluster) |
static List<org.apache.calcite.rex.RexFieldCollation> |
getOrderKeys(HiveParserPTFInvocationSpec.OrderSpec orderSpec,
HiveParserRexNodeConverter converter,
HiveParserRowResolver inputRR,
HiveParserTypeCheckCtx typeCheckCtx,
HiveParserSemanticAnalyzer semanticAnalyzer) |
static List<org.apache.calcite.rex.RexNode> |
getPartitionKeys(HiveParserPTFInvocationSpec.PartitionSpec partitionSpec,
HiveParserRexNodeConverter converter,
HiveParserRowResolver inputRR,
HiveParserTypeCheckCtx typeCheckCtx,
HiveParserSemanticAnalyzer semanticAnalyzer) |
static String[] |
getQualifiedTableName(HiveParserASTNode tabNameNode) |
static String |
getTypeStringFromAST(HiveParserASTNode typeNode) |
static String |
getUnescapedName(HiveParserASTNode tableOrColumnNode)
Get dequoted name from a table/column node.
|
static String |
getUnescapedName(HiveParserASTNode tableOrColumnNode,
String currentDatabase) |
static String |
getUnescapedUnqualifiedTableName(HiveParserASTNode node)
Get the unqualified name from a table node.
|
static int |
getWindowSpecIndx(HiveParserASTNode wndAST) |
static HiveParserBaseSemanticAnalyzer.Phase1Ctx |
initPhase1Ctx() |
static HiveParserBaseSemanticAnalyzer.TableType |
obtainTableType(org.apache.hadoop.hive.ql.metadata.Table tabMetaData) |
static void |
processPositionAlias(HiveParserASTNode ast,
org.apache.hadoop.hive.conf.HiveConf conf) |
static void |
readProps(HiveParserASTNode prop,
Map<String,String> mapProp)
Converts parsed key/value properties pairs into a map.
|
static void |
removeOBInSubQuery(HiveParserQBExpr qbExpr) |
static String |
stripQuotes(String val) |
static boolean |
topLevelConjunctCheck(HiveParserASTNode searchCond,
org.apache.hadoop.hive.common.ObjectPair<Boolean,Integer> subqInfo) |
static String |
unescapeIdentifier(String val)
Remove the encapsulating "`" pair from the identifier.
|
static String |
unescapeSQLString(String b) |
static void |
validateNoHavingReferenceToAlias(HiveParserQB qb,
HiveParserASTNode havingExpr,
HiveParserRowResolver inputRR,
HiveParserSemanticAnalyzer semanticAnalyzer) |
static void |
validatePartSpec(org.apache.hadoop.hive.ql.metadata.Table tbl,
Map<String,String> partSpec,
HiveParserASTNode astNode,
org.apache.hadoop.hive.conf.HiveConf conf,
boolean shouldBeFull,
org.apache.calcite.tools.FrameworkConfig frameworkConfig,
org.apache.calcite.plan.RelOptCluster cluster) |
public static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColumns(HiveParserASTNode ast) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColumns(HiveParserASTNode ast, boolean lowerCase) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static String getTypeStringFromAST(HiveParserASTNode typeNode) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static List<org.apache.hadoop.hive.metastore.api.FieldSchema> getColumns(HiveParserASTNode ast, boolean lowerCase, List<HiveParserBaseSemanticAnalyzer.PrimaryKey> primaryKeys, List<HiveParserBaseSemanticAnalyzer.NotNullConstraint> notNulls) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static String getDotName(String[] qname) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static void readProps(HiveParserASTNode prop, Map<String,String> mapProp)
prop
- HiveParserASTNode parent of the key/value pairsmapProp
- property map which receives the mappingspublic static String[] getQualifiedTableName(HiveParserASTNode tabNameNode) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static Tuple2<String,String> charSetString(String charSetName, String charSetString) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static String unescapeIdentifier(String val)
public static String getUnescapedUnqualifiedTableName(HiveParserASTNode node)
node
- the table nodepublic static String getUnescapedName(HiveParserASTNode tableOrColumnNode)
tableOrColumnNode
- the table or column nodepublic static String getUnescapedName(HiveParserASTNode tableOrColumnNode, String currentDatabase)
public static Map.Entry<String,String> getDbTableNamePair(HiveParserASTNode tableNameNode)
public static void validatePartSpec(org.apache.hadoop.hive.ql.metadata.Table tbl, Map<String,String> partSpec, HiveParserASTNode astNode, org.apache.hadoop.hive.conf.HiveConf conf, boolean shouldBeFull, org.apache.calcite.tools.FrameworkConfig frameworkConfig, org.apache.calcite.plan.RelOptCluster cluster) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static String getColumnInternalName(int pos)
public static List<Integer> getGroupingSets(List<HiveParserASTNode> groupByExpr, HiveParserQBParseInfo parseInfo, String dest) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static List<HiveParserASTNode> getGroupByForClause(HiveParserQBParseInfo parseInfo, String dest)
public static org.apache.calcite.rex.RexWindowBound getBound(HiveParserWindowingSpec.BoundarySpec spec, org.apache.calcite.plan.RelOptCluster cluster)
public static HiveParserBaseSemanticAnalyzer.Phase1Ctx initPhase1Ctx()
public static void processPositionAlias(HiveParserASTNode ast, org.apache.hadoop.hive.conf.HiveConf conf) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static void removeOBInSubQuery(HiveParserQBExpr qbExpr)
public static HiveParserBaseSemanticAnalyzer.TableType obtainTableType(org.apache.hadoop.hive.ql.metadata.Table tabMetaData)
public static org.apache.calcite.util.ImmutableBitSet convert(int value, int length)
public static Map<String,Integer> buildHiveColNameToInputPosMap(List<org.apache.hadoop.hive.ql.plan.ExprNodeDesc> colList, HiveParserRowResolver inputRR)
public static Map<String,Integer> buildHiveToCalciteColumnMap(HiveParserRowResolver rr)
public static org.apache.calcite.util.Pair<List<org.apache.calcite.rel.core.CorrelationId>,org.apache.calcite.util.ImmutableBitSet> getCorrelationUse(org.apache.calcite.rex.RexCall call)
public static boolean topLevelConjunctCheck(HiveParserASTNode searchCond, org.apache.hadoop.hive.common.ObjectPair<Boolean,Integer> subqInfo)
public static void addToGBExpr(HiveParserRowResolver groupByOutputRowResolver, HiveParserRowResolver groupByInputRowResolver, HiveParserASTNode grpbyExpr, org.apache.hadoop.hive.ql.plan.ExprNodeDesc grpbyExprNDesc, List<org.apache.hadoop.hive.ql.plan.ExprNodeDesc> gbExprNDescLst, List<String> outputColumnNames)
public static int getWindowSpecIndx(HiveParserASTNode wndAST)
public static void validateNoHavingReferenceToAlias(HiveParserQB qb, HiveParserASTNode havingExpr, HiveParserRowResolver inputRR, HiveParserSemanticAnalyzer semanticAnalyzer) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static List<org.apache.calcite.rex.RexNode> getPartitionKeys(HiveParserPTFInvocationSpec.PartitionSpec partitionSpec, HiveParserRexNodeConverter converter, HiveParserRowResolver inputRR, HiveParserTypeCheckCtx typeCheckCtx, HiveParserSemanticAnalyzer semanticAnalyzer) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static List<org.apache.calcite.rex.RexFieldCollation> getOrderKeys(HiveParserPTFInvocationSpec.OrderSpec orderSpec, HiveParserRexNodeConverter converter, HiveParserRowResolver inputRR, HiveParserTypeCheckCtx typeCheckCtx, HiveParserSemanticAnalyzer semanticAnalyzer) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static HiveParserBaseSemanticAnalyzer.AggInfo getHiveAggInfo(HiveParserASTNode aggAst, int aggFnLstArgIndx, HiveParserRowResolver inputRR, HiveParserWindowingSpec.WindowFunctionSpec winFuncSpec, HiveParserSemanticAnalyzer semanticAnalyzer, org.apache.calcite.tools.FrameworkConfig frameworkConfig, org.apache.calcite.plan.RelOptCluster cluster) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static org.apache.calcite.rel.RelNode genValues(String tabAlias, org.apache.hadoop.hive.ql.metadata.Table tmpTable, HiveParserRowResolver rowResolver, org.apache.calcite.plan.RelOptCluster cluster, List<List<String>> values)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.