Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
0.8.0
-
None
-
mapr sandbox 4.0.2
Description
Perhaps this could be a bug. I get the same results.
But the plan is very different, the UnionExchange is set up immediately after the scan operation in successful case( Case 1 ), where as UnionExchange is happening after scan>project (Case -2).
Case -1.Successful case.
0: jdbc:drill:> explain plan for select to_timestamp(t.t, 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''') FROM (select * from dfs.sthota_prq.`/tstamp_test/*.parquet` limit 13015351) t; ----------------------+ text json ----------------------+ 00-00 Screen 00-01 Project(EXPR$0=[TO_TIMESTAMP(ITEM($0, 't'), 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''')]) 00-02 SelectionVectorRemover 00-03 Limit(fetch=[13015351]) 00-04 UnionExchange 01-01 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_2_0.parquet], ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_1_0.parquet], ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_0_0.parquet]], selectionRoot=/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test, numFiles=3, columns=[`*`]]]) { "head" : Unknown macro: { "version" } ,
Case -2. Unsuccessful case:
0: jdbc:drill:> explain plan for select to_timestamp(t.t, 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''') FROM (select * from dfs.sthota_prq.`/tstamp_test/*.parquet` ) t; ----------------------+ text json ----------------------+ 00-00 Screen 00-01 UnionExchange 01-01 Project(EXPR$0=[TO_TIMESTAMP(ITEM($0, 't'), 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''')]) 01-02 Scan(groupscan=[ParquetGroupScan [entries=[ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_2_0.parquet], ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_1_0.parquet], ReadEntryWithPath [path=maprfs:/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test/1_0_0.parquet]], selectionRoot=/mapr/demo.mapr.com/user/sthota/parquet/tstamp_test, numFiles=3, columns=[`*`]]]) { "head" : Unknown macro: { "version" } ,
0: jdbc:drill:> select to_timestamp(t.t, 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''') FROM (select * from dfs.sthota_prq.`/tstamp_test/*.parquet` limit 10) t; ------------ EXPR$0 ------------ 2015-01-27 13:43:53.0 2015-01-27 13:43:49.0 2015-01-27 13:43:47.0 2015-01-27 13:43:47.0 2015-01-27 13:43:47.0 2015-01-27 13:43:45.0 2015-01-27 13:43:43.0 2015-01-27 13:43:43.0 2015-01-27 13:43:43.0 2015-01-27 13:43:39.0 ------------ 10 rows selected (1.127 seconds)
0: jdbc:drill:> select to_timestamp(t.t, 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''') FROM (select * from dfs.sthota_prq.`/tstamp_test/*.parquet`) t;
0: jdbc:drill:> select to_timestamp(t.t, 'YYYY-MM-dd''T''HH:mm:ss.SSS''Z''') FROM (select * from dfs.sthota_prq.`/tstamp_test/*.parquet`) t; Query failed: RemoteRpcException: Failure while trying to start remote fragment, Expression has syntax error! line 1:30:mismatched input 'T' expecting CParen [ ab817e5a-9b74-47dd-b3c6-3bbf025c7de9 on maprdemo:31010 ] Error: exception while executing query: Failure while executing query. (state=,code=0)