public class CalcitePlanner extends SemanticAnalyzer
Modifier and Type | Class and Description |
---|---|
static class |
CalcitePlanner.ASTSearcher |
class |
CalcitePlanner.CalcitePlannerAction
Code responsible for Calcite plan generation and optimization.
|
protected static class |
CalcitePlanner.InputContext
Contains information useful to decorrelate queries.
|
protected static class |
CalcitePlanner.PreCboCtx
The context that doPhase1 uses to populate information pertaining to CBO
(currently, this is used for CTAS and insert-as-select).
|
SemanticAnalyzer.GenericUDAFInfo, SemanticAnalyzer.MaterializationRebuildMode
BaseSemanticAnalyzer.AnalyzeRewriteContext, BaseSemanticAnalyzer.TableSpec
aliasToCTEs, analyzeRewrite, ast, autogenColAliasPrfxLbl, createVwDesc, defaultJoinMerge, disableJoinMerge, DUMMY_DATABASE, DUMMY_TABLE, forViewCreation, mvRebuildMode, opParseCtx, originalResultSchema, prunedPartitions, resultSchema, SUBQUERY_TAG_1, SUBQUERY_TAG_2, topOps, topOpsCopy, unparseTranslator, VALUES_TMP_TABLE_NAME_PREFIX, viewSelect
acidFileSinks, cacheUsage, cContext, columnAccessInfo, conf, console, ctx, db, fetchTask, idToTableNameMap, inputs, linfo, LOG, outputs, prepareQuery, queryProperties, queryState, rootTasks, STATIC_LOG, tableAccessInfo, transactionalInQuery, txnManager, updateColumnAccessInfo, userSuppliedFunctions
Constructor and Description |
---|
CalcitePlanner(QueryState queryState) |
Modifier and Type | Method and Description |
---|---|
void |
analyzeInternal(ASTNode ast) |
static org.apache.calcite.plan.RelOptPlanner |
createPlanner(HiveConf conf) |
protected org.apache.calcite.tools.Frameworks.PlannerAction<org.apache.calcite.rel.RelNode> |
createPlannerAction(Map<String,PrunedPartitionList> partitionCache,
StatsSource statsSource,
ColumnAccessInfo columnAccessInfo) |
protected ASTNode |
fixUpAfterCbo(ASTNode originalAst,
ASTNode newAst,
CalcitePlanner.PreCboCtx cboCtx) |
org.apache.calcite.rel.RelNode |
genLogicalPlan(ASTNode ast)
This method is useful if we want to obtain the logical plan after being parsed and
optimized by Calcite.
|
static org.apache.calcite.rex.RexNode |
genRexNode(ASTNode expr,
RowResolver input,
TypeCheckCtx tcCtx,
HiveConf conf)
Returns a Calcite
RexNode for the expression. |
String |
getOptimizedSql(org.apache.calcite.rel.RelNode optimizedOptiqPlan)
Get SQL rewrite for a Calcite logical plan
|
protected Table |
getTableObjectByName(String tabName,
boolean throwException) |
void |
resetCalciteConfiguration() |
static void |
warmup()
This method can be called at startup time to pre-register all the
additional Hive classes (compared to Calcite core classes) that may
be visited during the planning phase in the metadata providers
and the field trimmer.
|
addPartitionColsToInsert, addPartitionColsToInsert, allowOutputMultipleTimes, analyzeCreateView, compilePlan, enableColumnStatsCollecting, executeUnParseTranslations, forViewCreation, generateErrorMessage, genExprNodeDesc, genFileSinkPlan, getAcidAnalyzeTable, getAliasId, getAllInputs, getAllOutputs, getAllRootTasks, getColNameToDefaultValueMap, getColumnInternalName, getDefaultConstraints, getDummyTable, getFullTableNameForSQL, getGenericUDAFEvaluator, getGenericUDAFEvaluator2, getGenericUDAFInfo, getGenericUDAFInfo2, getInvalidAutomaticRewritingMaterializationReason, getInvalidResultCacheReason, getLoadFileWork, getLoadTableWork, getOpContext, getOriginalResultSchema, getParseContext, getQB, getResultSchema, getSinkOp, getTableObjectByName, getTargetTable, getTopOps, getViewAliasToInput, groupByDescModeToUDAFMode, hasGroupBySibling, init, isConstantParameterInAggregationParameters, isInsertInto, isSelectDistinct, isValidAutomaticRewritingMaterialization, isValidQueryCaching, parseSelect, processNoScanCommand, processTableColumnNames, reset, rewriteGroupingFunctionAST, saveViewDefinition, setAST, setBit, setInvalidAutomaticRewritingMaterializationReason, setInvalidResultCacheReason, setLoadFileWork, setLoadTableWork, startAnalysis, translateFieldDesc, updating, validate
addPropertyReadEntry, analyze, analyzeStoredAdDirs, charSetString, checkColumnName, constructListBucketingCtx, createFetchTask, createHiveDB, endAnalysis, escapeSQLString, findTabRefIdxs, getAcidDdlDesc, getAcidFileSinks, getAutoCommitValue, getCacheUsage, getCboInfo, getColumnAccessInfo, getColumnNames, getColumnNamesOrder, getColumns, getColumns, getColumns, getCtx, getDatabase, getDatabase, getDataConnector, getDataConnector, getDb, getDbTableNamePair, getFetchTask, getIdToTableNameMap, getInputs, getLineageInfo, getOutputs, getPartitionSpecs, getPartSpec, getProps, getQualifiedTableName, getQualifiedTableName, getQueryProperties, getQueryState, getRootTasks, getSimpleTableNameBase, getTable, getTable, getTable, getTable, getTable, getTable, getTableAccessInfo, getTableAlias, getTxnMgr, getTypeStringFromAST, getUnescapedName, getUnescapedName, getUnescapedUnqualifiedTableName, getUpdateColumnAccessInfo, getUserSuppliedFunctions, getValidatedPartSpec, hasTransactionalInQuery, initCtx, isPrepareQuery, isValidPrefixSpec, processOrderSpec, raiseWrongType, readProps, setAutoCommitValue, setCacheUsage, setColumnAccessInfo, setFetchTask, setLineageInfo, setTableAccessInfo, setUpdateColumnAccessInfo, skipAuthorization, stripQuotes, toReadEntity, toReadEntity, toReadEntity, toWriteEntity, toWriteEntity, toWriteEntity, tryQualifyPath, unescapeIdentifier, unescapeSQLString, validatePartColumnType, validatePartSpec, validateUnsupportedPartitionClause
public CalcitePlanner(QueryState queryState) throws SemanticException
SemanticException
public void resetCalciteConfiguration()
public void analyzeInternal(ASTNode ast) throws SemanticException
analyzeInternal
in class SemanticAnalyzer
SemanticException
public org.apache.calcite.rel.RelNode genLogicalPlan(ASTNode ast) throws SemanticException
SemanticException
public static org.apache.calcite.plan.RelOptPlanner createPlanner(HiveConf conf)
protected ASTNode fixUpAfterCbo(ASTNode originalAst, ASTNode newAst, CalcitePlanner.PreCboCtx cboCtx) throws SemanticException
SemanticException
protected org.apache.calcite.tools.Frameworks.PlannerAction<org.apache.calcite.rel.RelNode> createPlannerAction(Map<String,PrunedPartitionList> partitionCache, StatsSource statsSource, ColumnAccessInfo columnAccessInfo)
public String getOptimizedSql(org.apache.calcite.rel.RelNode optimizedOptiqPlan)
protected Table getTableObjectByName(String tabName, boolean throwException) throws HiveException
getTableObjectByName
in class SemanticAnalyzer
HiveException
public static org.apache.calcite.rex.RexNode genRexNode(ASTNode expr, RowResolver input, TypeCheckCtx tcCtx, HiveConf conf) throws SemanticException
RexNode
for the expression.
If it is evaluated already in previous operator, it can be retrieved from cache.SemanticException
public static void warmup()
Copyright © 2023 The Apache Software Foundation. All rights reserved.