drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adene...@apache.org
Subject drill git commit: DRILL-4487: add unit test for DRILL-4449
Date Wed, 09 Mar 2016 08:14:39 GMT
Repository: drill
Updated Branches:
  refs/heads/master 49ae6d363 -> 9c00027dd


DRILL-4487: add unit test for DRILL-4449


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

Branch: refs/heads/master
Commit: 9c00027ddab6b3c10c72e69be335ba3656fa7c1b
Parents: 49ae6d3
Author: adeneche <adeneche@gmail.com>
Authored: Tue Mar 8 16:54:31 2016 +0100
Committer: adeneche <adeneche@gmail.com>
Committed: Wed Mar 9 07:03:50 2016 +0100

----------------------------------------------------------------------
 .../store/parquet/TestParquetMetadataCache.java     | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/9c00027d/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
index 0b8b7d9..4330c96 100644
--- a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetMetadataCache.java
@@ -161,6 +161,22 @@ public class TestParquetMetadataCache extends PlanTestBase {
     Assert.assertEquals(25, rowCount);
   }
 
+  @Test
+  public void testFix4449() throws Exception {
+    runSQL("CREATE TABLE dfs_test.tmp.`4449` PARTITION BY(l_discount) AS SELECT l_orderkey,
l_discount FROM cp.`tpch/lineitem.parquet`");
+    runSQL("REFRESH TABLE METADATA dfs_test.tmp.`4449`");
+
+    testBuilder()
+      .sqlQuery("SELECT COUNT(*) cnt FROM (" +
+        "SELECT l_orderkey FROM dfs_test.tmp.`4449` WHERE l_discount < 0.05" +
+        " UNION ALL" +
+        " SELECT l_orderkey FROM dfs_test.tmp.`4449` WHERE l_discount > 0.02)")
+      .unOrdered()
+      .baselineColumns("cnt")
+      .baselineValues(71159L)
+      .go();
+  }
+
   private void checkForMetadataFile(String table) throws Exception {
     String tmpDir = getDfsTestTmpSchemaLocation();
     String metaFile = Joiner.on("/").join(tmpDir, table, Metadata.METADATA_FILENAME);


Mime
View raw message