public class AlterMaterializedViewRebuildAnalyzer extends CalcitePlanner
SemanticAnalyzer generates a plan which is derived from the materialized view definition
query plan.
HiveFilter operator on top of each
HiveTableScan operator. The condition has a predicate like ROW_ID.writeid <= high_watermark
This step is done by HiveAugmentMaterializationRule or HiveAugmentSnapshotMaterializationRule.
The resulting plan should produce the current result of the materialized view, the one which was created at last
rebuild.HiveUnion operator on top with two branches
HiveAggregateInsertIncrementalRewritingRuleHiveJoinInsertIncrementalRewritingRuleHiveAggregateInsertDeleteIncrementalRewritingRuleHiveTableScan operators are fetching the deleted rows too
and HiveRowIsDeletedPropagator ensures that extra filter conditions are added to address these.
| Modifier and Type | Class and Description |
|---|---|
protected class |
AlterMaterializedViewRebuildAnalyzer.MVRebuildCalcitePlannerAction |
CalcitePlanner.ASTSearcher, CalcitePlanner.CalcitePlannerAction, CalcitePlanner.InputContext, CalcitePlanner.PreCboCtxSemanticAnalyzer.GenericUDAFInfo, SemanticAnalyzer.MaterializationRebuildModeBaseSemanticAnalyzer.AnalyzeRewriteContext, BaseSemanticAnalyzer.TableSpec| Modifier and Type | Field and Description |
|---|---|
protected Table |
mvTable |
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, viewSelectacidFileSinks, cacheUsage, cContext, columnAccessInfo, conf, console, ctx, db, fetchTask, idToTableNameMap, inputs, linfo, outputs, prepareQuery, queryProperties, queryState, rootTasks, STATIC_LOG, tableAccessInfo, transactionalInQuery, txnManager, updateColumnAccessInfo, userSuppliedFunctions| Constructor and Description |
|---|
AlterMaterializedViewRebuildAnalyzer(QueryState queryState) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
allowOutputMultipleTimes() |
void |
analyzeInternal(ASTNode root) |
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) |
createPlanner, genLogicalPlan, genRexNode, getOptimizedSql, getTableObjectByName, resetCalciteConfiguration, warmupaddPartitionColsToInsert, addPartitionColsToInsert, analyzeCreateView, compilePlan, enableColumnStatsCollecting, executeUnParseTranslations, forViewCreation, generateErrorMessage, genExprNodeDesc, genFileSinkPlan, getAcidAnalyzeTable, getAliasId, getAllInputs, getAllOutputs, getAllRootTasks, getColNameToDefaultValueMap, getColumnInternalName, getDefaultConstraints, getDummyTable, getGenericUDAFEvaluator, getGenericUDAFEvaluator2, getGenericUDAFInfo, getGenericUDAFInfo2, getInvalidResultCacheReason, getLoadFileWork, getLoadTableWork, getMaterializationValidationResult, getOpContext, getOriginalResultSchema, getParseContext, getQB, getResultSchema, getSinkOp, getTableObjectByName, getTargetTable, getTopOps, getViewAliasToInput, groupByDescModeToUDAFMode, hasGroupBySibling, init, isConstantParameterInAggregationParameters, isInsertInto, isSelectDistinct, isValidQueryCaching, parseSelect, processNoScanCommand, processTableColumnNames, reset, rewriteGroupingFunctionAST, saveViewDefinition, setAST, setBit, setInvalidResultCacheReason, setLoadFileWork, setLoadTableWork, setMaterializationValidationResult, startAnalysis, translateFieldDesc, updating, validateaddPropertyReadEntry, 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, getFullTableNameForSQL, 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, validateUnsupportedPartitionClauseprotected Table mvTable
public AlterMaterializedViewRebuildAnalyzer(QueryState queryState) throws SemanticException
SemanticExceptionpublic void analyzeInternal(ASTNode root) throws SemanticException
analyzeInternal in class CalcitePlannerSemanticExceptionprotected org.apache.calcite.tools.Frameworks.PlannerAction<org.apache.calcite.rel.RelNode> createPlannerAction(Map<String,PrunedPartitionList> partitionCache, StatsSource statsSource, ColumnAccessInfo columnAccessInfo)
createPlannerAction in class CalcitePlannerprotected ASTNode fixUpAfterCbo(ASTNode originalAst, ASTNode newAst, CalcitePlanner.PreCboCtx cboCtx) throws SemanticException
fixUpAfterCbo in class CalcitePlannerSemanticExceptionprotected boolean allowOutputMultipleTimes()
allowOutputMultipleTimes in class SemanticAnalyzerCopyright © 2024 The Apache Software Foundation. All rights reserved.