Krystal created DRILL-4554: ------------------------------ Summary: Data type mismatch for union all with timestamp and date Key: DRILL-4554 URL: https://issues.apache.org/jira/browse/DRILL-4554 Project: Apache Drill Issue Type: Bug Components: Query Planning & Optimization Reporter: Krystal Assignee: Sean Hsuan-Yi Chu
Calcite and drill execute different implicit cast when a union all query contains timestamp and date on both right and left hand side but in different order. select col_tmstmp,col_date, col_boln from `prqUnAll_0_v` union all select col_date, col_tmstmp, col_boln from `prqUnAll_1_v` limit 0: select * from (select col_tmstmp,col_date, col_boln from `prqUnAll_0_v` union all select col_date, col_tmstmp, col_boln from `prqUnAll_1_v`) t limit 0 limit 0: [col_tmstmp, col_date, col_boln] regular: [col_tmstmp, col_date, col_boln] limit 0: [DATE, DATE, BOOLEAN] regular: [TIMESTAMP, TIMESTAMP, BOOLEAN] limit 0: [columnNullable, columnNullable, columnNullable] regular: [columnNullable, columnNullable, columnNullable] -- This message was sent by Atlassian JIRA (v6.3.4#6332)