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.SerDeClassProps
including serde class name and the properties.
|
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,
ResolvedCatalogTable catalogTable,
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... names) |
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 ObjectIdentifier |
getObjectIdentifier(CatalogRegistry catalogRegistry,
HiveParserASTNode tabNameNode) |
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 UnresolvedIdentifier |
getQualifiedTableName(HiveParserASTNode tabNameNode) |
static ResolvedCatalogBaseTable<?> |
getResolvedCatalogBaseTable(CatalogRegistry catalogRegistry,
ObjectIdentifier tableIdentifier) |
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 |
getUnescapedName(HiveParserASTNode tableOrColumnNode,
String currentCatalog,
String currentDatabase) |
static String |
getUnescapedOriginTableName(HiveParserASTNode node)
Get the unescaped origin table name for the table node.
|
static String |
getUnescapedUnqualifiedTableName(HiveParserASTNode node)
Get the unqualified name from a table node.
|
static Set<org.apache.calcite.rel.core.CorrelationId> |
getVariablesSetForFilter(org.apache.calcite.rex.RexNode rexNode)
traverse the given node to find all correlated variables, the main logic is from
HiveFilter.getVariablesSet() . |
static int |
getWindowSpecIndx(HiveParserASTNode wndAST) |
static HiveParserBaseSemanticAnalyzer.Phase1Ctx |
initPhase1Ctx() |
static HiveParserBaseSemanticAnalyzer.TableType |
obtainTableType(org.apache.hadoop.hive.ql.metadata.Table tabMetaData) |
static ObjectIdentifier |
parseCompoundName(CatalogRegistry catalogRegistry,
String compoundName) |
static void |
processPositionAlias(HiveParserASTNode ast,
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 |
validatePartColumnType(ResolvedCatalogTable resolvedCatalogTable,
Map<String,String> partSpec,
HiveParserASTNode astNode,
HiveConf conf,
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 void readProps(HiveParserASTNode prop, Map<String,String> mapProp)
prop
- HiveParserASTNode parent of the key/value pairsmapProp
- property map which receives the mappingspublic static ObjectIdentifier getObjectIdentifier(CatalogRegistry catalogRegistry, HiveParserASTNode tabNameNode) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static ObjectIdentifier parseCompoundName(CatalogRegistry catalogRegistry, String compoundName)
public static UnresolvedIdentifier 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) throws org.apache.hadoop.hive.ql.parse.SemanticException
node
- the table nodeorg.apache.hadoop.hive.ql.parse.SemanticException
public static String getUnescapedName(HiveParserASTNode tableOrColumnNode) throws org.apache.hadoop.hive.ql.parse.SemanticException
tableOrColumnNode
- the table or column nodeorg.apache.hadoop.hive.ql.parse.SemanticException
public static String getUnescapedName(HiveParserASTNode tableOrColumnNode, @Nullable String currentCatalog, @Nullable String currentDatabase) throws org.apache.hadoop.hive.ql.parse.SemanticException
org.apache.hadoop.hive.ql.parse.SemanticException
public static String getUnescapedOriginTableName(HiveParserASTNode node) throws org.apache.hadoop.hive.ql.parse.SemanticException
node
- the table nodeorg.apache.hadoop.hive.ql.parse.SemanticException
public static String getUnescapedName(HiveParserASTNode tableOrColumnNode, String currentDatabase)
public static Map.Entry<String,String> getDbTableNamePair(HiveParserASTNode tableNameNode)
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, 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, ResolvedCatalogTable catalogTable, HiveParserRowResolver rowResolver, org.apache.calcite.plan.RelOptCluster cluster, List<List<String>> values)
public static Set<org.apache.calcite.rel.core.CorrelationId> getVariablesSetForFilter(org.apache.calcite.rex.RexNode rexNode)
HiveFilter.getVariablesSet()
.public static void validatePartColumnType(ResolvedCatalogTable resolvedCatalogTable, Map<String,String> partSpec, HiveParserASTNode astNode, HiveConf conf, 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 ResolvedCatalogBaseTable<?> getResolvedCatalogBaseTable(CatalogRegistry catalogRegistry, ObjectIdentifier tableIdentifier)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.