Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Drill >> mail # dev >> [2/5] git commit: Drill 342/238: Clean up Parquet tests.


Copy link to this message
-
[2/5] git commit: Drill 342/238: Clean up Parquet tests.
Drill 342/238: Clean up Parquet tests.
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/822bd9c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/822bd9c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/822bd9c2

Branch: refs/heads/master
Commit: 822bd9c2dd02724385e4140cc0ab2960e8902d39
Parents: 2ed7a67
Author: Jason Altekruse <[EMAIL PROTECTED]>
Authored: Tue Mar 11 08:27:53 2014 -0700
Committer: Jacques Nadeau <[EMAIL PROTECTED]>
Committed: Tue Mar 11 08:27:53 2014 -0700

 .../store/parquet/ParquetRecordReaderTest.java  |  23 +-
 .../store/parquet/ParquetRecordReaderTest2.java | 742 -------------------
 .../resources/parquet/parquet_nullable.json     |  42 ++
 .../parquet/parquet_nullable_varlen.json        |  42 ++
 .../parquet/parquet_selective_column_read.json  |  27 +
 .../src/test/resources/parquet_nullable.json    |  41 -
 .../test/resources/parquet_nullable_varlen.json |  41 -
 .../src/test/resources/parquet_scan_screen.json |  40 -
 .../parquet_scan_screen_read_entry_replace.json |  40 -
 .../parquet_scan_union_screen_physical.json     |  35 -
 .../parquet_selective_column_read.json          |  27 -
 pom.xml                                         |   2 +
 12 files changed, 124 insertions(+), 978 deletions(-)
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/822bd9c2/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
index 9e999e3..2b043aa 100644
+++ b/exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/ParquetRecordReaderTest.java
@@ -30,7 +30,6 @@ import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
 import mockit.Injectable;
-
 import org.apache.drill.common.config.DrillConfig;
 import org.apache.drill.common.expression.ExpressionPosition;
 import org.apache.drill.common.expression.FieldReference;
@@ -42,7 +41,7 @@ import org.apache.drill.exec.exception.SchemaChangeException;
 import org.apache.drill.exec.expr.fn.FunctionImplementationRegistry;
 import org.apache.drill.exec.ops.FragmentContext;
 import org.apache.drill.exec.physical.impl.OutputMutator;
-import org.apache.drill.exec.proto.BitControl.PlanFragment;
+import org.apache.drill.exec.proto.BitControl;
 import org.apache.drill.exec.proto.UserProtos;
 import org.apache.drill.exec.record.MaterializedField;
 import org.apache.drill.exec.record.RecordBatchLoader;
@@ -282,7 +281,7 @@ public class ParquetRecordReaderTest {
     HashMap<String, FieldInfo> fields = new HashMap<>();
     ParquetTestProperties props = new ParquetTestProperties(3, 3000, DEFAULT_BYTES_PER_PAGE, fields);
     populateFieldInfoMap(props);
-    testParquetFullEngineEventBased(true, "/parquet_scan_screen.json", "/tmp/test.parquet", 1, props);
+    testParquetFullEngineEventBased(true, "/parquet/parquet_scan_screen.json", "/tmp/test.parquet", 1, props);
   }
 
   // TODO - Test currently marked ignore to prevent breaking of the build process, requires a binary file that was
@@ -295,7 +294,7 @@ public class ParquetRecordReaderTest {
     ParquetTestProperties props = new ParquetTestProperties(1, 3000000, DEFAULT_BYTES_PER_PAGE, fields);
     Object[] boolVals = {true, null, null};
     props.fields.put("a", new FieldInfo("boolean", "a", 1, boolVals, TypeProtos.MinorType.BIT, props));
-    testParquetFullEngineEventBased(false, "/parquet_nullable.json", "/tmp/nullable_test.parquet", 1, props);
+    testParquetFullEngineEventBased(false, "/parquet/parquet_nullable.json", "/tmp/nullable_test.parquet", 1, props);
   }
 
   @Ignore
@@ -308,7 +307,7 @@ public class ParquetRecordReaderTest {
     byte[] val3 = { 'l','o','n','g','e','r',' ','s','t','r','i','n','g'};
     Object[] boolVals = { val, val2, val3};
     props.fields.put("a", new FieldInfo("boolean", "a", 1, boolVals, TypeProtos.MinorType.BIT, props));
-    testParquetFullEngineEventBased(false, "/parquet_nullable_varlen.json", "/tmp/nullable_varlen.parquet", 1, props);
+    testParquetFullEngineEventBased(false, "/parquet/parquet_nullable_varlen.json", "/tmp/nullable_varlen.parquet", 1, props);
   }
 
   @Test
@@ -335,15 +334,15 @@ public class ParquetRecordReaderTest {
     HashMap<String, FieldInfo> fields = new HashMap<>();
     ParquetTestProperties props = new ParquetTestProperties(5, 300000, DEFAULT_BYTES_PER_PAGE, fields);
     TestFileGenerator.populatePigTPCHCustomerFields(props);
-    String readEntries = "{path: \"/tmp/tpc-h/customer\"}";
-    testParquetFullEngineEventBased(false, false, "/parquet_scan_screen_read_entry_replace.json", readEntries,
+    String readEntries = "\"/tmp/tpc-h/customer\"";
+    testParquetFullEngineEventBased(false, false, "/parquet/parquet_scan_screen_read_entry_replace.json", readEntries,
         "unused, no file is generated", 1, props, true);
 
     fields = new HashMap();
     props = new ParquetTestProperties(5, 300000, DEFAULT_BYTES_PER_PAGE, fields);
     TestFileGenerator.populatePigTPCHSupplierFields(props);
-    readEntries = "{path: \"/tmp/tpc-h/supplier\"}";
-    testParquetFullEngineEventBased(false, false, "/parquet_scan_screen_read_entry_replace.json", readEntries,
+    readEntries = "\"/tmp/tpc-h/supplier\"";
+    testParquetFullEngineEventBased(false, false, "/parquet/parquet_scan_screen_read_entry_replace.json", readEntries,
         "unused, no file is generated", 1, props, true);
   }
 
@@ -352,7 +351,7 @@ public class ParquetRecordReaderTest {
     HashMap<String, FieldInfo> fields = new HashMap<>();
     ParquetTestProperties props = new ParquetTestProperties(4, 3000, DEFAULT_BYTES_PER_PAGE, fields);
     populateFieldInfoMap(props);
-    testParquetFullEngineEventBased(true, "/parquet_scan_screen.json", "/tmp/test.parquet", 1,