drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [1/5] git commit: Fix DRILL-791: In Phase 1of2 use the agg expr ordinal and create new AggregateCall for non-COUNT functions.
Date Wed, 21 May 2014 20:28:39 GMT
Repository: incubator-drill
Updated Branches:
  refs/heads/master 5d7e3d3ab -> ae570aad8


Fix DRILL-791: In Phase 1of2 use the agg expr ordinal and create new AggregateCall for non-COUNT
functions.


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/37c1d067
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/37c1d067
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/37c1d067

Branch: refs/heads/master
Commit: 37c1d067436f03347ccc7a69eada0bc5fd6a8558
Parents: 5d7e3d3
Author: Aman Sinha <asinha@maprtech.com>
Authored: Tue May 20 13:40:39 2014 -0700
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Tue May 20 13:40:39 2014 -0700

----------------------------------------------------------------------
 .../apache/drill/exec/planner/physical/AggPrelBase.java   | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/37c1d067/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
index c3b1188..fb60885 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/planner/physical/AggPrelBase.java
@@ -149,7 +149,15 @@ public abstract class AggPrelBase extends AggregateRelBase implements
Prel{
 
           phase2AggCallList.add(newAggCall); 
         } else {
-          phase2AggCallList.add(aggCall.e);
+          AggregateCall newAggCall = 
+              new AggregateCall(
+                  aggCall.e.getAggregation(), 
+                  aggCall.e.isDistinct(), 
+                  Collections.singletonList(aggExprOrdinal), 
+                  aggCall.e.getType(),
+                  aggCall.e.getName());
+          
+          phase2AggCallList.add(newAggCall);
         }
       }
     }    


Mime
View raw message