Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
0.9.0
-
None
Description
0: jdbc:drill:schema=dfs> select dir1 from bigtable limit 1; +------------+------------+------------+------------+ | a1 | b1 | c1 | dir1 | +------------+------------+------------+------------+ | 1 | aaaaa | 2015-01-01 | 01 | +------------+------------+------------+------------+ 1 row selected (0.189 seconds) 0: jdbc:drill:schema=dfs> select dir0 from bigtable limit 1; +------------+------------+------------+------------+ | a1 | b1 | c1 | dir0 | +------------+------------+------------+------------+ | 1 | aaaaa | 2015-01-01 | 2015 | +------------+------------+------------+------------+ 1 row selected (0.193 seconds)
In explain plan, I don't see project:
0: jdbc:drill:schema=dfs> explain plan for select dir0 from bigtable;
+------------+------------+
| text | json |
+------------+------------+
| 00-00 Screen
00-01 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/4_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/3_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/5_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/1_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/2_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/01/0_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/02/0_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/03/0_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2015/04/0_0_0.parquet], ReadEntryWithPath [path=maprfs:/test/bigtable/2016/01/parquet.file], ReadEntryWithPath [path=maprfs:/test/bigtable/2016/parquet.file]], selectionRoot=/test/bigtable, numFiles=11, columns=[`dir0`]]])
If you project both dir0 and dir1, both columns are projected with the correct result:
0: jdbc:drill:schema=dfs> select dir0, dir1 from bigtable; +------------+------------+ | dir0 | dir1 | +------------+------------+ | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 | | 2015 | 01 |
[Wed Apr 15 14:09:47 root@/mapr/vmarkman.cluster.com/test/bigtable ] # ls -R .: 2015 2016 ./2015: 01 02 03 04 ./2015/01: 0_0_0.parquet 1_0_0.parquet 2_0_0.parquet 3_0_0.parquet 4_0_0.parquet 5_0_0.parquet ./2015/02: 0_0_0.parquet ./2015/03: 0_0_0.parquet ./2015/04: 0_0_0.parquet ./2016: 01 parquet.file ./2016/01: parquet.file