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/06/30 19:57:08 UTC
drill git commit: DRILL-3304: Use SUM instead of SUM0 for window
aggregate until CALCITE-777 is fixed.
Repository: drill
Updated Branches:
refs/heads/master e2e59a01b -> e3fc7e97b
DRILL-3304: Use SUM instead of SUM0 for window aggregate until CALCITE-777 is fixed.
Add unit test.
Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/e3fc7e97
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e3fc7e97
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e3fc7e97
Branch: refs/heads/master
Commit: e3fc7e97bfe712dc09d43a8a055a5135c96b7344
Parents: e2e59a0
Author: Aman Sinha <as...@maprtech.com>
Authored: Tue Jun 30 00:57:23 2015 -0700
Committer: Aman Sinha <as...@maprtech.com>
Committed: Tue Jun 30 10:55:51 2015 -0700
----------------------------------------------------------------------
.../org/apache/drill/exec/TestWindowFunctions.java | 11 +++++++++++
.../test/resources/window/table_with_nulls.parquet | Bin 0 -> 395 bytes
pom.xml | 2 +-
3 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/drill/blob/e3fc7e97/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
index 24c1f4c..8676c28 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/TestWindowFunctions.java
@@ -392,4 +392,15 @@ public class TestWindowFunctions extends BaseTestQuery {
.go();
}
+ @Test // DRILL-3404
+ public void testWindowSumAggIsNotNull() throws Exception {
+ String query = String.format("select count(*) cnt from (select sum ( c1 ) over ( partition by c2 order by c1 asc nulls first ) w_sum from dfs.`%s/window/table_with_nulls.parquet` ) sub_query where w_sum is not null", TEST_RES_PATH);
+ testBuilder()
+ .sqlQuery(query)
+ .ordered()
+ .baselineColumns("cnt")
+ .baselineValues(26l)
+ .build().run();
+ }
+
}
http://git-wip-us.apache.org/repos/asf/drill/blob/e3fc7e97/exec/java-exec/src/test/resources/window/table_with_nulls.parquet
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/window/table_with_nulls.parquet b/exec/java-exec/src/test/resources/window/table_with_nulls.parquet
new file mode 100644
index 0000000..1bed27d
Binary files /dev/null and b/exec/java-exec/src/test/resources/window/table_with_nulls.parquet differ
http://git-wip-us.apache.org/repos/asf/drill/blob/e3fc7e97/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 9d40d09..7d93e3e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1226,7 +1226,7 @@
<dependency>
<groupId>org.apache.calcite</groupId>
<artifactId>calcite-core</artifactId>
- <version>1.1.0-drill-r13</version>
+ <version>1.1.0-drill-r14</version>
<exclusions>
<exclusion>
<groupId>org.jgrapht</groupId>