Repository: drill
Updated Branches:
  refs/heads/master 6676f2d76 -> d9b61fac2


DRILL-2168:  Fix incorrect query result issue when group by use an expression 
with drill build-in functions.  Fix is in Calcite.


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

Branch: refs/heads/master
Commit: d9b61fac28fafc3a84fdfe75db811a620ea464b2
Parents: 6676f2d
Author: Jinfeng Ni <j...@apache.org>
Authored: Wed Feb 11 17:11:06 2015 -0800
Committer: Jinfeng Ni <j...@apache.org>
Committed: Tue Feb 17 10:54:36 2015 -0800

----------------------------------------------------------------------
 .../drill/exec/fn/impl/TestAggregateFunctions.java   | 15 +++++++++++++++
 pom.xml                                              |  2 +-
 2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/d9b61fac/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
----------------------------------------------------------------------
diff --git 
a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
 
b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
index bf8af3b..543eff8 100644
--- 
a/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
+++ 
b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
@@ -113,4 +113,19 @@ public class TestAggregateFunctions extends BaseTestQuery {
     .build().run();
   }
 
+  @Test // DRILL-2168
+  public void testGBExprWithDrillFunc() throws Exception {
+    testBuilder()
+        .ordered()
+        .sqlQuery("select concat(n_name, cast(n_nationkey as varchar(10))) as 
name, count(*) as cnt " +
+            "from cp.`tpch/nation.parquet` " +
+            "group by concat(n_name, cast(n_nationkey as varchar(10))) " +
+            "having concat(n_name, cast(n_nationkey as varchar(10))) > 
'UNITED'" +
+            "order by concat(n_name, cast(n_nationkey as varchar(10)))")
+        .baselineColumns("name", "cnt")
+        .baselineValues("UNITED KINGDOM23", 1L)
+        .baselineValues("UNITED STATES24", 1L)
+        .baselineValues("VIETNAM21", 1L)
+        .build().run();
+  }
 }

http://git-wip-us.apache.org/repos/asf/drill/blob/d9b61fac/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 17f0e09..7f973c8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -946,7 +946,7 @@
           <dependency>
             <groupId>net.hydromatic</groupId>
             <artifactId>optiq-core</artifactId>
-            <version>0.9-drill-r18</version>
+            <version>0.9-drill-r19</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>

Reply via email to