[
https://issues.apache.org/jira/browse/HIVE-25747?focusedWorklogId=724320&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-724320
]
ASF GitHub Bot logged work on HIVE-25747:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/22 07:31
Start Date: 10/Feb/22 07:31
Worklog Time Spent: 10m
Work Description: kasakrisz commented on a change in pull request #2881:
URL: https://github.com/apache/hive/pull/2881#discussion_r803373480
##########
File path:
ql/src/java/org/apache/hadoop/hive/ql/ddl/view/materialized/alter/rebuild/AlterMaterializedViewRebuildAnalyzer.java
##########
@@ -399,8 +402,35 @@ private RelNode applyPartitionIncrementalRebuildPlan(
return applyPreJoinOrderingTransforms(basePlan, mdProvider,
executorProvider);
}
- return applyIncrementalRebuild(basePlan, mdProvider, executorProvider,
- HiveInsertOnlyScanWriteIdRule.INSTANCE,
HiveAggregatePartitionIncrementalRewritingRule.INSTANCE);
+ RelNode incrementalRebuildPlan = applyIncrementalRebuild(basePlan,
mdProvider, executorProvider,
+ HiveInsertOnlyScanWriteIdRule.INSTANCE,
+ HiveAggregatePartitionIncrementalRewritingRule.INSTANCE);
+
+ HepProgramBuilder program = new HepProgramBuilder();
+ generatePartialProgram(program, false, HepMatchOrder.DEPTH_FIRST,
HiveScanCostSetterRule.with(materialization));
+ incrementalRebuildPlan = executeProgram(incrementalRebuildPlan,
program.build(), mdProvider, executorProvider);
+
+ // Make a cost-based decision factoring the configuration property
+ optCluster.invalidateMetadataQuery();
+
RelMetadataQuery.THREAD_PROVIDERS.set(HiveTezModelRelMetadataProvider.DEFAULT);
+ try {
+ // Multiply by 10.0 because this config is also used in
applyAggregateInsertIncremental
+ final double factorSelectivity = HiveConf.getFloatVar(
+ conf,
HiveConf.ConfVars.HIVE_MATERIALIZED_VIEW_REBUILD_INCREMENTAL_FACTOR) * 10.0;
Review comment:
Removed the magic factor 10.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 724320)
Time Spent: 0.5h (was: 20m)
> Make a cost base decision when rebuilding materialized views
> ------------------------------------------------------------
>
> Key: HIVE-25747
> URL: https://issues.apache.org/jira/browse/HIVE-25747
> Project: Hive
> Issue Type: Improvement
> Components: CBO, Materialized views
> Reporter: Krisztian Kasa
> Assignee: Krisztian Kasa
> Priority: Major
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Choose between full insert-overwrite and partition based incremental rebuild
> plan when rebuilding partitioned materialized views.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)