drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meh...@apache.org
Subject drill git commit: DRILL-1860: Bump calcite version to r14 Add test case for count() of a nullable column within a map, actual fix is in calcite.
Date Wed, 24 Dec 2014 04:04:57 GMT
Repository: drill
Updated Branches:
  refs/heads/master 5f70ba1cd -> e95e43bd0


DRILL-1860: Bump calcite version to r14
Add test case for count() of a nullable column within a map, actual 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/e95e43bd
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/e95e43bd
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/e95e43bd

Branch: refs/heads/master
Commit: e95e43bd01af2163a026f681f30059f2a2f4ec57
Parents: 5f70ba1
Author: Mehant Baid <mehantr@gmail.com>
Authored: Sat Dec 20 01:56:06 2014 -0800
Committer: Mehant Baid <mehantr@gmail.com>
Committed: Tue Dec 23 13:24:37 2014 -0800

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


http://git-wip-us.apache.org/repos/asf/drill/blob/e95e43bd/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
new file mode 100644
index 0000000..14f5a4c
--- /dev/null
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/fn/impl/TestAggregateFunctions.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.drill.exec.fn.impl;
+
+import org.apache.drill.BaseTestQuery;
+import org.junit.Test;
+
+public class TestAggregateFunctions extends BaseTestQuery {
+
+  /*
+   * Test checks the count of a nullable column within a map
+   * and verifies count is equal only to the number of times the
+   * column appears and doesn't include the null count
+   */
+  @Test
+  public void testCountOnNullableColumn() throws Exception {
+    testBuilder()
+        .sqlQuery("select count(t.x.y)  as cnt1, count(`integer`) as cnt2 from cp.`/jsoninput/input2.json`
t")
+        .ordered()
+        .baselineColumns("cnt1", "cnt2")
+        .baselineValues(3l, 4l)
+        .build().run();
+  }
+}

http://git-wip-us.apache.org/repos/asf/drill/blob/e95e43bd/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a566b84..4e9fb62 100644
--- a/pom.xml
+++ b/pom.xml
@@ -920,7 +920,7 @@
           <dependency>
             <groupId>net.hydromatic</groupId>
             <artifactId>optiq-core</artifactId>
-            <version>0.9-drill-r12</version>
+            <version>0.9-drill-r14</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>


Mime
View raw message