Github user parthchandra commented on a diff in the pull request:
https://github.com/apache/drill/pull/1049#discussion_r158986526
--- Diff:
exec/java-exec/src/test/java/org/apache/drill/exec/store/parquet/TestParquetComplex.java
---
@@ -193,4 +200,168 @@ public void notxistsField() throws Exception {
.run();
}
+ @Test //DRILL-5971
+ public void testComplexLogicalIntTypes() throws Exception {
+ String query = String.format("select t.complextype as complextype, " +
+ "t.uint_64 as uint_64, t.uint_32 as uint_32, t.uint_16 as
uint_16, t.uint_8 as uint_8, " +
+ "t.int_64 as int_64, t.int_32 as int_32, t.int_16 as int_16,
t.int_8 as int_8 " +
+ "from cp.`store/parquet/complex/logical_int_complex.parquet`
t" );
+ String[] columns = {"complextype", "uint_64", "uint_32", "uint_16",
"uint_8", "int_64", "int_32", "int_16", "int_8" };
+ testBuilder()
+ .sqlQuery(query)
+ .unOrdered()
+ .baselineColumns(columns)
+ .baselineValues( mapOf("a","a","b","b") , 0L ,
0 , 0 , 0 , 0L , 0 , 0
,0 )
+ .baselineValues( mapOf("a","a","b","b") , -1L ,
-1 , -1 , -1 , -1L , -1 , -1
, -1 )
+ .baselineValues( mapOf("a","a","b","b") , 1L ,
1 , 1 , 1 , -9223372036854775808L , 1 , 1
, 1 )
+ .baselineValues( mapOf("a","a","b","b") , 9223372036854775807L ,
2147483647 , 65535 , 255 , 9223372036854775807L , -2147483648 ,
-32768 , -128 )
+ .build()
+ .run();
+ }
+
+ @Test //DRILL-5971
+ public void testComplexLogicalIntTypes2() throws Exception {
+ byte[] bytes12 = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
'a', 'b' };
+ byte[] bytesOnes = new byte[12]; Arrays.fill(bytesOnes, (byte)1);
--- End diff --
Can't see how that makes things more readable. This way, the declaration
and initialization is together and all the declarations are clearly readable.
Changed it anyway since you asked :)
---