hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jcama...@apache.org
Subject hive git commit: HIVE-11813: Avoid expensive AST tree conversion to String for expressions in WHERE clause in CBO (Jesus Camacho Rodriguez, reviewed by Hari Sankar Sivarama Subramaniyan)
Date Wed, 16 Sep 2015 14:49:43 GMT
Repository: hive
Updated Branches:
  refs/heads/master 03f46b2f2 -> 5a550cb46


HIVE-11813: Avoid expensive AST tree conversion to String for expressions in WHERE clause
in CBO (Jesus Camacho Rodriguez, reviewed by Hari Sankar Sivarama Subramaniyan)


Project: http://git-wip-us.apache.org/repos/asf/hive/repo
Commit: http://git-wip-us.apache.org/repos/asf/hive/commit/5a550cb4
Tree: http://git-wip-us.apache.org/repos/asf/hive/tree/5a550cb4
Diff: http://git-wip-us.apache.org/repos/asf/hive/diff/5a550cb4

Branch: refs/heads/master
Commit: 5a550cb466664daaa2322aeaf5abf19f2b9d51c0
Parents: 03f46b2
Author: Jesus Camacho Rodriguez <jcamacho@apache.org>
Authored: Wed Sep 16 15:48:59 2015 +0100
Committer: Jesus Camacho Rodriguez <jcamacho@apache.org>
Committed: Wed Sep 16 15:48:59 2015 +0100

----------------------------------------------------------------------
 .../org/apache/hadoop/hive/ql/parse/CalcitePlanner.java     | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hive/blob/5a550cb4/ql/src/java/org/apache/hadoop/hive/ql/parse/CalcitePlanner.java
----------------------------------------------------------------------
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 8e992da..d5c747f 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
@@ -1482,8 +1482,9 @@ public class CalcitePlanner extends SemanticAnalyzer {
       return tableRel;
     }
 
-    private RelNode genFilterRelNode(ASTNode filterExpr, RelNode srcRel) throws SemanticException
{
-      ExprNodeDesc filterCondn = genExprNodeDesc(filterExpr, relToHiveRR.get(srcRel));
+    private RelNode genFilterRelNode(ASTNode filterExpr, RelNode srcRel,
+            boolean useCaching) throws SemanticException {
+      ExprNodeDesc filterCondn = genExprNodeDesc(filterExpr, relToHiveRR.get(srcRel), useCaching);
       if (filterCondn instanceof ExprNodeConstantDesc
           && !filterCondn.getTypeString().equals(serdeConstants.BOOLEAN_TYPE_NAME))
{
         // queries like select * from t1 where 'foo';
@@ -1634,7 +1635,7 @@ public class CalcitePlanner extends SemanticAnalyzer {
               subQuery.getJoinConditionAST());
           searchCond = subQuery.updateOuterQueryFilter(clonedSearchCond);
 
-          srcRel = genFilterRelNode(searchCond, srcRel);
+          srcRel = genFilterRelNode(searchCond, srcRel, forHavingClause);
 
           /*
            * For Not Exists and Not In, add a projection on top of the Left
@@ -1650,7 +1651,7 @@ public class CalcitePlanner extends SemanticAnalyzer {
         return srcRel;
       }
 
-      return genFilterRelNode(searchCond, srcRel);
+      return genFilterRelNode(searchCond, srcRel, forHavingClause);
     }
 
     private RelNode projectLeftOuterSide(RelNode srcRel, int numColumns) throws SemanticException
{


Mime
View raw message