You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Venkata krishnan Sowrirajan (JIRA)" <ji...@apache.org> on 2015/04/09 22:05:12 UTC
[jira] [Created] (DRILL-2738) Offset with casting a column to
timestamp not working
Venkata krishnan Sowrirajan created DRILL-2738:
--------------------------------------------------
Summary: Offset with casting a column to timestamp not working
Key: DRILL-2738
URL: https://issues.apache.org/jira/browse/DRILL-2738
Project: Apache Drill
Issue Type: Bug
Affects Versions: 0.7.0
Reporter: Venkata krishnan Sowrirajan
In the below query, it should skip the first row which is a header and want to cast one of the column to timestamp. But it is trying to parse the first row to cast it to timestamp. Without casting it to timestamp, simple offset query works fine.
"select cast(columns[0] as timestamp) from `guts-csv/CSV/guts_run_lab-app002.csv` offset 1;"
So I did explain plan on the above query
explain plan without implementation for select cast(columns[0] as timestamp) from `guts-csv/CSV/guts_run_lab-app002.csv` offset 1;
DrillScreenRel
DrillLimitRel(offset=[1])
DrillProjectRel(EXPR$0=[CAST(ITEM($0, 0)):TIMESTAMP(0)])
DrillScanRel(table=[[fs, drill, guts-csv/CSV/guts_run_lab-app002.csv]], groupscan=[EasyGroupScan [selectionRoot=/mapr/yarn-test/drill/guts-csv/CSV/guts_run_lab-app002.csv, numFiles=1, columns=[`columns`[0]], files=[file:/mapr/yarn-test/drill/guts-csv/CSV/guts_run_lab-app002.csv]]])
In the plan, it looks like it tries to do casting to timestamp and then the offset operation which is why its failing.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)