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-1500: Add unit test case
Date Tue, 20 Jan 2015 02:19:15 GMT
Repository: drill
Updated Branches:
  refs/heads/master 3d2a3e1c8 -> 7a136ae00


DRILL-1500: Add unit test case


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

Branch: refs/heads/master
Commit: 7a136ae009d7c81f6d3532515028652a2da82806
Parents: 3d2a3e1
Author: Aman Sinha <asinha@maprtech.com>
Authored: Mon Jan 19 18:17:56 2015 -0800
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Mon Jan 19 18:17:56 2015 -0800

----------------------------------------------------------------------
 .../test/java/org/apache/drill/TestStarQueries.java | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/7a136ae0/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
index 2433170..3bbe2b5 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestStarQueries.java
@@ -18,11 +18,14 @@
 package org.apache.drill;
 
 import org.apache.drill.common.types.TypeProtos;
+import org.apache.drill.common.util.TestTools;
 import org.junit.Test;
 import org.apache.drill.exec.rpc.RpcException;
 
 public class TestStarQueries extends BaseTestQuery{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestStarQueries.class);
+  static final String WORKING_PATH = TestTools.getWorkingPath();
+  static final String TEST_RES_PATH = WORKING_PATH + "/src/test/resources";
 
   @Test // see DRILL-2021
   public void testSelStarCommaSameColumnRepeated() throws Exception {
@@ -307,4 +310,17 @@ public class TestStarQueries extends BaseTestQuery{
     test("select * from cp.`tpch/nation.parquet` order by random()");
   }
 
+  @Test // DRILL-1500
+  public void testStarPartitionFilterOrderBy() throws Exception {
+    String query = String.format("select * from dfs_test.`%s/multilevel/parquet` where dir0=1994
and dir1='Q1' order by dir0 limit 1", TEST_RES_PATH);
+    org.joda.time.DateTime mydate = new org.joda.time.DateTime("1994-01-20T00:00:00.000-08:00");
+
+    testBuilder()
+    .sqlQuery(query)
+    .ordered()
+    .baselineColumns("dir0", "dir1", "o_clerk", "o_comment", "o_custkey", "o_orderdate",
"o_orderkey",  "o_orderpriority", "o_orderstatus", "o_shippriority",  "o_totalprice")
+    .baselineValues("1994", "Q1", "Clerk#000000743", "y pending requests integrate", 1292,
mydate, 66, "5-LOW", "F",  0, 104190.66)
+    .build().run();
+  }
+
 }


Mime
View raw message