drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-2873) CTAS reports error when timestamp values in CSV file are quoted
Date Fri, 24 Apr 2015 21:27:38 GMT
Khurram Faraaz created DRILL-2873:
-------------------------------------

             Summary: CTAS reports error when timestamp values in CSV file are quoted
                 Key: DRILL-2873
                 URL: https://issues.apache.org/jira/browse/DRILL-2873
             Project: Apache Drill
          Issue Type: Bug
          Components: Storage - Parquet
    Affects Versions: 0.9.0
         Environment: 64e3ec52b93e9331aa5179e040eca19afece8317 | DRILL-2611: value vectors
should report valid value count | 16.04.2015 @ 13:53:34 EDT
            Reporter: Khurram Faraaz
            Assignee: Steven Phillips


When timestamp values are quoted in quotes (") inside a CSV data file, CTAS statement reports
error.

Failing CTAS

{code}
0: jdbc:drill:> create table prqFrmCSV02 as select cast(columns[0] as int) col_int, cast(columns[1]
as bigint) col_bgint, cast(columns[2] as char(10)) col_char, cast(columns[3] as varchar(18))
col_vchar, cast(columns[4] as timestamp) col_tmstmp, cast(columns[5] as date) col_date, cast(columns[6]
as boolean) col_boln, cast(columns[7] as double) col_dbl from `csvToPrq.csv`;
Query failed: SYSTEM ERROR: Invalid format: ""2015-04-23 23:47:00.124""

[a601a66a-b305-4a92-9836-f39edcdc8fe8 on centos-02.qa.lab:31010]

Error: exception while executing query: Failure while executing query. (state=,code=0)
{code}


Stack trace from drillbit.log

{code}
2015-04-24 18:41:09,721 [2ac571ba-778f-f3d5-c60f-af2e536905a3:frag:0:0] ERROR o.a.drill.exec.ops.FragmentContext
- Fragment Context received failure -- Fragment: 0:0
org.apache.drill.common.exceptions.DrillUserException: SYSTEM ERROR: Invalid format: ""2015-04-23
23:47:00.124""

[a601a66a-b305-4a92-9836-f39edcdc8fe8 on centos-02.qa.lab:31010]

        at org.apache.drill.common.exceptions.DrillUserException$Builder.build(DrillUserException.java:115)
~[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.common.exceptions.ErrorHelper.wrap(ErrorHelper.java:39) ~[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.ops.FragmentContext.fail(FragmentContext.java:151) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.WriterRecordBatch.innerNext(WriterRecordBatch.java:131)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:51)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:135)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:74) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext(ScreenCreator.java:76)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.BaseRootExec.next(BaseRootExec.java:64) ~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.work.fragment.FragmentExecutor.run(FragmentExecutor.java:164)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.common.SelfCleaningRunnable.run(SelfCleaningRunnable.java:38)
[drill-common-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
[na:1.7.0_75]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
[na:1.7.0_75]
        at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
Caused by: java.lang.IllegalArgumentException: Invalid format: ""2015-04-23 23:47:00.124""
        at org.joda.time.format.DateTimeFormatter.parseDateTime(DateTimeFormatter.java:873)
~[joda-time-2.3.jar:2.3]
        at org.joda.time.DateTime.parse(DateTime.java:144) ~[joda-time-2.3.jar:2.3]
        at org.apache.drill.exec.test.generated.ProjectorGen323.doEval(ProjectorTemplate.java:388)
~[na:na]
        at org.apache.drill.exec.test.generated.ProjectorGen323.projectRecords(ProjectorTemplate.java:62)
~[na:na]
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork(ProjectRecordBatch.java:175)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext(AbstractSingleRecordBatch.java:93)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext(ProjectRecordBatch.java:135)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:142)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next(IteratorValidatorBatchIterator.java:118)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:99)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.record.AbstractRecordBatch.next(AbstractRecordBatch.java:89)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        at org.apache.drill.exec.physical.impl.WriterRecordBatch.innerNext(WriterRecordBatch.java:102)
~[drill-java-exec-0.9.0-SNAPSHOT-rebuffed.jar:0.9.0-SNAPSHOT]
        ... 16 common frames omitted
{code}

Snippet of data from input CSV file

{code}
-225058309,44225657827296040,"QAhHUTNv","njEl0iAivVwLEbAg","2015-04-23 23:47:00.124","2001-05-27",true,905562343.765
1999912439,2211473083106365,"oBwtZmzK","WOLzjgzk5HgXO8l1","2015-04-23 23:47:00.124","1958-03-12",true,99152273.9327
1784506402,29351094148275324,"QlyTFtkw","SmP428hFKw5A085 ","2015-04-23 23:47:00.126","1990-07-21",false,752670995.24
2012511944,53048515756157424,"BybVyYWH","cnDqVgMANMtJGbuv","2015-04-23 23:47:00.127","1953-02-10",false,784335138.726
1546241934,77079445473902384,"ZDxIxxLs","JHp2B9q0rJKyZ12K","2015-04-23 23:47:00.127","1976-01-09",false,870192831.047
1553741594,69736976577857208,"smtgHcaV","aJoVXdN9363arx1Y","2015-04-23 23:47:00.127","1953-10-18",true,1109816755.0
395345402,18812010265162496,"pNetevKF","IrXNHyRm4EY02Mv7","2015-04-23 23:47:00.127","1989-09-17",false,166747196.389
-478640426,71296213927402152,"jXsJbzuR","DJGy8xMZGEpHOEJh","2015-04-23 23:47:00.128","2013-02-21",false,541750692.166
{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message