drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amansi...@apache.org
Subject git commit: DRILL-1421: Add unit tests and data. Bump up drill-optiq version to 0.9-drill-r5. Fix is in corresponding Optiq version.
Date Tue, 04 Nov 2014 16:39:14 GMT
Repository: incubator-drill
Updated Branches:
  refs/heads/master 85ffeef52 -> 129cb9c84


DRILL-1421: Add unit tests and data.  Bump up drill-optiq version to 0.9-drill-r5.  Fix is
in corresponding Optiq version.


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

Branch: refs/heads/master
Commit: 129cb9c84827dda15fcc084c3ede925779cda8da
Parents: 85ffeef
Author: Aman Sinha <asinha@maprtech.com>
Authored: Fri Oct 31 09:22:29 2014 -0700
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Tue Nov 4 08:32:52 2014 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/TestTextJoin.java     | 45 ++++++++++++++++++++
 .../src/test/resources/uservisits/rankings.tbl  |  5 +++
 .../src/test/resources/uservisits/temp1.tbl     |  9 ++++
 .../test/resources/uservisits/uservisits.tbl    |  4 ++
 pom.xml                                         |  3 +-
 5 files changed, 65 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/129cb9c8/exec/java-exec/src/test/java/org/apache/drill/TestTextJoin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestTextJoin.java b/exec/java-exec/src/test/java/org/apache/drill/TestTextJoin.java
new file mode 100644
index 0000000..7fd9c8e
--- /dev/null
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestTextJoin.java
@@ -0,0 +1,45 @@
+/**
+ * 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 org.apache.drill.common.util.TestTools;
+import org.junit.Test;
+
+public class TestTextJoin extends BaseTestQuery{
+  static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestTextJoin.class);
+
+  static final String WORKING_PATH = TestTools.getWorkingPath();
+  static final String TEST_RES_PATH = WORKING_PATH + "/src/test/resources";
+
+  @Test
+  public void testTextJoin1() throws Exception {
+    String query1 = String.format("select r.columns[0] as v, r.columns[1] as w, r.columns[2]
as x, u.columns[0] as y, t.columns[0] as z from dfs_test.`%s/uservisits/rankings.tbl` r, "
+        + " dfs_test.`%s/uservisits/uservisits.tbl` u, dfs_test.`%s/uservisits/temp1.tbl`
t "
+        + " where r.columns[1]=u.columns[1] and r.columns[1] = t.columns[1]", TEST_RES_PATH,
TEST_RES_PATH, TEST_RES_PATH);
+    test(query1);
+  }
+
+  @Test
+  public void testTextJoin2() throws Exception {
+    String query1 = String.format("select r.columns[0] as v, r.columns[1] as w, r.columns[2]
as x, u.columns[0] as y "
+        + " from dfs_test.`%s/uservisits/rankings.tbl` r, dfs_test.`%s/uservisits/uservisits.tbl`
u "
+        + " where r.columns[1]=u.columns[1] and r.columns[0] < 50", TEST_RES_PATH, TEST_RES_PATH);
+    test(query1);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/129cb9c8/exec/java-exec/src/test/resources/uservisits/rankings.tbl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/uservisits/rankings.tbl b/exec/java-exec/src/test/resources/uservisits/rankings.tbl
new file mode 100644
index 0000000..a211d23
--- /dev/null
+++ b/exec/java-exec/src/test/resources/uservisits/rankings.tbl
@@ -0,0 +1,5 @@
+59|0ongfhacprm.html|92
+21|0ixgkdqscplgorsmo.html|68
+18|1fluxeqqxdnfdzhltjelqxxrrptkdsouxaouefkbiyhmypxrybcpzzhqoabstqn.html|44
+195|1hu.html|68
+15|1zvrsiul.html|74

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/129cb9c8/exec/java-exec/src/test/resources/uservisits/temp1.tbl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/uservisits/temp1.tbl b/exec/java-exec/src/test/resources/uservisits/temp1.tbl
new file mode 100644
index 0000000..4b5d415
--- /dev/null
+++ b/exec/java-exec/src/test/resources/uservisits/temp1.tbl
@@ -0,0 +1,9 @@
+1|temp.html|1
+2|1qafg.html|74
+3|1zvrsiul.html|74
+21|0ixgkdqscplgorsmo.html|68
+31|0edsnyefdzmiavnwzeooqlbmooga.html|5
+59|0ongfhacprm.html|92
+18|1fluxeqqxdnfdzhltjelqxxrrptkdsouxaouefkbiyhmypxrybcpzzhqoabstqn.html|44
+20|0yrgmwotpxiljutwtysulx.html|42
+195|1hu.html|68

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/129cb9c8/exec/java-exec/src/test/resources/uservisits/uservisits.tbl
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/uservisits/uservisits.tbl b/exec/java-exec/src/test/resources/uservisits/uservisits.tbl
new file mode 100644
index 0000000..bc9771e
--- /dev/null
+++ b/exec/java-exec/src/test/resources/uservisits/uservisits.tbl
@@ -0,0 +1,4 @@
+168.109.35.39|1hu.html|1981-1-24|308.9246|TJvMultiHttpGrabber Componen|SLV|SLV-FR|content|5
+168.113.12.37|0ixgkdqscplgorsmo.html|1998-9-14|293.46985|Llaut/1.0|DZA|DZA-OY|processing|3
+156.110.20.42|0ongfhacprm.html|1981-11-22|498.61685|iltrovatore-setaccio/1.2-dev|EST|EST-JY|nucleus|5
+159.108.31.25|1fluxeqqxdnfdzhltjelqxxrrptkdsouxaouefkbiyhmypxrybcpzzhqoabstqn.html|1987-9-23|498.1644|updated/0.1beta|TON|TON-TP|symbiotic|8

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/129cb9c8/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 62f597f..a2c0749 100644
--- a/pom.xml
+++ b/pom.xml
@@ -187,6 +187,7 @@
             <exclude>**/*.pb.h</exclude>
             <exclude>**/*.linux</exclude>
             <exclude>**/client/build/**</exclude>
+            <exclude>**/*.tbl</exclude>
           </excludes>
         </configuration>
       </plugin>
@@ -899,7 +900,7 @@
           <dependency>
             <groupId>net.hydromatic</groupId>
             <artifactId>optiq-core</artifactId>
-            <version>0.9-drill-r4</version>
+            <version>0.9-drill-r5</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>


Mime
View raw message