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-2712: Testcases added
Date Fri, 24 Apr 2015 23:11:11 GMT
Repository: drill
Updated Branches:
  refs/heads/master e99f27032 -> eb199d614


DRILL-2712: Testcases added


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

Branch: refs/heads/master
Commit: eb199d6147af7acbb9ef92d550fdce9ad37e28c9
Parents: e99f270
Author: Hsuan-Yi Chu <hsuanyi@usc.edu>
Authored: Mon Apr 20 10:17:10 2015 -0700
Committer: Aman Sinha <asinha@maprtech.com>
Committed: Fri Apr 24 15:59:18 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/TestPartitionFilter.java   | 23 +++++++++++++++++++-
 1 file changed, 22 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/eb199d61/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java b/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
index 400847d..828d8ec 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/TestPartitionFilter.java
@@ -20,6 +20,7 @@ package org.apache.drill;
 
 import static org.junit.Assert.assertEquals;
 
+import org.apache.drill.common.util.FileUtils;
 import org.apache.drill.common.util.TestTools;
 import org.junit.Test;
 
@@ -159,4 +160,24 @@ public class TestPartitionFilter extends PlanTestBase {
     testIncludeFilter(query, 6, "Filter", 9);
   }
 
-}
+  @Test // see DRILL-2712
+  public void testMainQueryFalseCondition() throws Exception {
+    String root = FileUtils.getResourceAsFile("/multilevel/parquet").toURI().toString();
+    String query = String.format("select * from (select dir0, o_custkey from dfs_test.`%s`
where dir0='1994') t where 1 = 0", root);
+    testExcludeFilter(query, 4, "Filter", 0);
+  }
+
+  @Test // see DRILL-2712
+  public void testMainQueryTrueCondition() throws Exception {
+    String root = FileUtils.getResourceAsFile("/multilevel/parquet").toURI().toString();
+    String query =  String.format("select * from (select dir0, o_custkey from dfs_test.`%s`
where dir0='1994' ) t where 0 = 0", root);
+    testExcludeFilter(query, 4, "Filter", 40);
+  }
+
+  @Test // see DRILL-2712
+  public void testMainQueryFilterRegularColumn() throws Exception {
+    String root = FileUtils.getResourceAsFile("/multilevel/parquet").toURI().toString();
+    String query =  String.format("select * from (select dir0, o_custkey from dfs_test.`%s`
where dir0='1994' and o_custkey = 10) t limit 0", root);
+    testIncludeFilter(query, 4, "Filter", 0);
+  }
+}
\ No newline at end of file


Mime
View raw message