drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject drill git commit: DRILL-391: Test case for large IN list (actual fix/workaround is in Calcite version 0.9-drill-r12).
Date Sun, 14 Dec 2014 20:19:19 GMT
Repository: drill
Updated Branches:
  refs/heads/0.7.0 89f050099 -> 8547dd20b


DRILL-391:  Test case for large IN list (actual fix/workaround is in Calcite version 0.9-drill-r12).

Bump up Calcite version to 0.9-drill-r12.


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

Branch: refs/heads/0.7.0
Commit: 8547dd20bdc8b9ffd5c034fc0d983b76d3fadc32
Parents: 89f0500
Author: Aman Sinha <asinha@maprtech.com>
Authored: Fri Dec 12 17:13:57 2014 -0800
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Sun Dec 14 11:55:29 2014 -0800

----------------------------------------------------------------------
 .../test/java/org/apache/drill/TestInList.java  | 40 ++++++++++++++++++++
 pom.xml                                         |  2 +-
 2 files changed, 41 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/8547dd20/exec/java-exec/src/test/java/org/apache/drill/TestInList.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestInList.java b/exec/java-exec/src/test/java/org/apache/drill/TestInList.java
new file mode 100644
index 0000000..03fbf97
--- /dev/null
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestInList.java
@@ -0,0 +1,40 @@
+/**
+ * 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;
+
+import static org.junit.Assert.assertEquals;
+
+import org.apache.drill.common.util.TestTools;
+import org.junit.Test;
+
+public class TestInList extends BaseTestQuery{
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestInList.class);
+
+  @Test
+  public void testLargeInList1() throws Exception {
+    int actualRecordCount = testSql("select employee_id from cp.`employee.json` where employee_id
in (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ,14, 15, 16, 17, 18, 19, 20" +
+        ", 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40"
+
+        ", 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60"
+
+        ")");
+
+    int expectedRecordCount = 59;
+    assertEquals(String.format("Received unexepcted number of rows in output: expected=%d,
received=%s",
+        expectedRecordCount, actualRecordCount), expectedRecordCount, actualRecordCount);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/drill/blob/8547dd20/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 30667f6..cbabdb7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -920,7 +920,7 @@
           <dependency>
             <groupId>net.hydromatic</groupId>
             <artifactId>optiq-core</artifactId>
-            <version>0.9-drill-r11</version>
+            <version>0.9-drill-r12</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>


Mime
View raw message