[14/53] [abbrv] hive git commit: HIVE-11330: Add early termination for recursion in StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by Hari Subramaniyan)

2015-08-05 Thread sershe
HIVE-11330: Add early termination for recursion in 
StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by 
Hari Subramaniyan)


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

Branch: refs/heads/llap
Commit: 4ee17e53c194501d8eaca07c3039379b56d86d26
Parents: f312d17
Author: Hari Subramaniyan harisan...@apache.org
Authored: Wed Jul 29 14:57:31 2015 -0700
Committer: Hari Subramaniyan harisan...@apache.org
Committed: Wed Jul 29 14:57:31 2015 -0700

--
 .../hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/4ee17e53/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
--
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
index 376d42c..1663b88 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
@@ -301,6 +301,9 @@ public class StatsRulesProcFactory {
   long newNumRows = 0;
   Statistics andStats = null;
 
+  if (stats.getNumRows() = 1 || stats.getDataSize() = 0)
+return 1;
+
   if (pred instanceof ExprNodeGenericFuncDesc) {
 ExprNodeGenericFuncDesc genFunc = (ExprNodeGenericFuncDesc) pred;
 GenericUDF udf = genFunc.getGenericUDF();



hive git commit: HIVE-11330: Add early termination for recursion in StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by Hari Subramaniyan)

2015-07-29 Thread harisankar
Repository: hive
Updated Branches:
  refs/heads/branch-1 5105bbd46 - d5f81a423


HIVE-11330: Add early termination for recursion in 
StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by 
Hari Subramaniyan)


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

Branch: refs/heads/branch-1
Commit: d5f81a423d33710df61a3f573c7cdbacce4bffd9
Parents: 5105bbd
Author: Hari Subramaniyan harisan...@apache.org
Authored: Wed Jul 29 14:57:31 2015 -0700
Committer: Hari Subramaniyan harisan...@apache.org
Committed: Wed Jul 29 14:59:07 2015 -0700

--
 .../hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/d5f81a42/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
--
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
index 376d42c..1663b88 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
@@ -301,6 +301,9 @@ public class StatsRulesProcFactory {
   long newNumRows = 0;
   Statistics andStats = null;
 
+  if (stats.getNumRows() = 1 || stats.getDataSize() = 0)
+return 1;
+
   if (pred instanceof ExprNodeGenericFuncDesc) {
 ExprNodeGenericFuncDesc genFunc = (ExprNodeGenericFuncDesc) pred;
 GenericUDF udf = genFunc.getGenericUDF();



hive git commit: HIVE-11330: Add early termination for recursion in StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by Hari Subramaniyan)

2015-07-29 Thread harisankar
Repository: hive
Updated Branches:
  refs/heads/master f312d17ef - 4ee17e53c


HIVE-11330: Add early termination for recursion in 
StatsRulesProcFactory.evaluateExpression (Prasanth Jayachandran, reviewed by 
Hari Subramaniyan)


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

Branch: refs/heads/master
Commit: 4ee17e53c194501d8eaca07c3039379b56d86d26
Parents: f312d17
Author: Hari Subramaniyan harisan...@apache.org
Authored: Wed Jul 29 14:57:31 2015 -0700
Committer: Hari Subramaniyan harisan...@apache.org
Committed: Wed Jul 29 14:57:31 2015 -0700

--
 .../hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java | 3 +++
 1 file changed, 3 insertions(+)
--


http://git-wip-us.apache.org/repos/asf/hive/blob/4ee17e53/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
--
diff --git 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
index 376d42c..1663b88 100644
--- 
a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
+++ 
b/ql/src/java/org/apache/hadoop/hive/ql/optimizer/stats/annotation/StatsRulesProcFactory.java
@@ -301,6 +301,9 @@ public class StatsRulesProcFactory {
   long newNumRows = 0;
   Statistics andStats = null;
 
+  if (stats.getNumRows() = 1 || stats.getDataSize() = 0)
+return 1;
+
   if (pred instanceof ExprNodeGenericFuncDesc) {
 ExprNodeGenericFuncDesc genFunc = (ExprNodeGenericFuncDesc) pred;
 GenericUDF udf = genFunc.getGenericUDF();