You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by ra...@apache.org on 2020/01/06 22:26:23 UTC
[hive] branch master updated: HIVE-22630 : Do not retrieve
Materialized View definitions for rebuild if query is test SQL (Rajkumar
Singh, reviewed by Ashutosh Chauhan)
This is an automated email from the ASF dual-hosted git repository.
rajksingh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 47b22ce HIVE-22630 : Do not retrieve Materialized View definitions for rebuild if query is test SQL (Rajkumar Singh, reviewed by Ashutosh Chauhan)
47b22ce is described below
commit 47b22ce1c658fa1b970c3e2733871948e39afe32
Author: Rajkumar Singh <ra...@apache.org>
AuthorDate: Mon Jan 6 14:25:32 2020 -0800
HIVE-22630 : Do not retrieve Materialized View definitions for rebuild if query is test SQL (Rajkumar Singh, reviewed by Ashutosh Chauhan)
---
ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java b/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
index 0a6e995..cde8ead 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
@@ -1843,7 +1843,8 @@ public class CalcitePlanner extends SemanticAnalyzer {
// We disable it for CTAS and MV creation queries (trying to avoid any problem
// due to data freshness)
if (conf.getBoolVar(ConfVars.HIVE_MATERIALIZED_VIEW_ENABLE_AUTO_REWRITING) &&
- !getQB().isMaterializedView() && !ctx.isLoadingMaterializedView() && !getQB().isCTAS()) {
+ !getQB().isMaterializedView() && !ctx.isLoadingMaterializedView() && !getQB().isCTAS() &&
+ getQB().hasTableDefined()) {
calcitePreCboPlan = applyMaterializedViewRewriting(planner,
calcitePreCboPlan, mdProvider.getMetadataProvider(), executorProvider);
}