You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by am...@apache.org on 2015/01/26 08:55:24 UTC
[1/2] drill git commit: DRILL-2063: Fix is in Calcite (ensure
uniqueness of fields in the row type of AggregateRel). Added unit test and
bumped up calcite version to 0.9-drill-r18.
Repository: drill
Updated Branches:
refs/heads/master 5b2a11b7c -> 3c6d0ef65
DRILL-2063: Fix is in Calcite (ensure uniqueness of fields in the row type of AggregateRel). Added unit test and bumped up calcite version to 0.9-drill-r18.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/52b36ed9
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/52b36ed9
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/52b36ed9
Branch: refs/heads/master
Commit: 52b36ed9dabb51e63fd1c555094f95e192bb63a0
Parents: 5b2a11b
Author: Aman Sinha <as...@maprtech.com>
Authored: Sat Jan 24 13:18:39 2015 -0800
Committer: Aman Sinha <as...@maprtech.com>
Committed: Sat Jan 24 13:18:39 2015 -0800
----------------------------------------------------------------------
.../java/org/apache/drill/TestExampleQueries.java | 15 +++++++++++++++
pom.xml | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/52b36ed9/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
index a3b5ff1..8f04657 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
@@ -518,4 +518,19 @@ public class TestExampleQueries extends BaseTestQuery{
assertEquals(expectedRecordCount, actualRecordCount);
}
+ @Test // DRILL-2063
+ public void testAggExpressionWithGroupBy() throws Exception {
+ String query = "select l_suppkey, sum(l_extendedprice)/sum(l_quantity) as avg_price \n" +
+ " from cp.`tpch/lineitem.parquet` where l_orderkey in \n" +
+ " (select o_orderkey from cp.`tpch/orders.parquet` where o_custkey = 2) \n" +
+ " and l_suppkey = 4 group by l_suppkey";
+
+ testBuilder()
+ .sqlQuery(query)
+ .ordered()
+ .baselineColumns("l_suppkey", "avg_price")
+ .baselineValues(4, 1374.47)
+ .build().run();
+
+ }
}
http://git-wip-us.apache.org/repos/asf/drill/blob/52b36ed9/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9492004..2087a0b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -921,7 +921,7 @@
<dependency>
<groupId>net.hydromatic</groupId>
<artifactId>optiq-core</artifactId>
- <version>0.9-drill-r16</version>
+ <version>0.9-drill-r18</version>
<exclusions>
<exclusion>
<groupId>org.jgrapht</groupId>
[2/2] drill git commit: DRILL-1888: Added unit test for HAVING clause
on aggregate expression. Fix is common with DRILL-2063.
Posted by am...@apache.org.
DRILL-1888: Added unit test for HAVING clause on aggregate expression. Fix is common with DRILL-2063.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/3c6d0ef6
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/3c6d0ef6
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/3c6d0ef6
Branch: refs/heads/master
Commit: 3c6d0ef6595810a0a6b15e48da25fb268ccf2b36
Parents: 52b36ed
Author: Aman Sinha <as...@maprtech.com>
Authored: Sat Jan 24 16:53:34 2015 -0800
Committer: Aman Sinha <as...@maprtech.com>
Committed: Sat Jan 24 16:53:34 2015 -0800
----------------------------------------------------------------------
.../java/org/apache/drill/TestExampleQueries.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/3c6d0ef6/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
index 8f04657..dffa0a6 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestExampleQueries.java
@@ -533,4 +533,20 @@ public class TestExampleQueries extends BaseTestQuery{
.build().run();
}
+
+ @Test // DRILL-1888
+ public void testAggExpressionWithGroupByHaving() throws Exception {
+ String query = "select l_suppkey, sum(l_extendedprice)/sum(l_quantity) as avg_price \n" +
+ " from cp.`tpch/lineitem.parquet` where l_orderkey in \n" +
+ " (select o_orderkey from cp.`tpch/orders.parquet` where o_custkey = 2) \n" +
+ " group by l_suppkey having sum(l_extendedprice)/sum(l_quantity) > 1850.0";
+
+ testBuilder()
+ .sqlQuery(query)
+ .ordered()
+ .baselineColumns("l_suppkey", "avg_price")
+ .baselineValues(98, 1854.95)
+ .build().run();
+ }
+
}