You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Victoria Markman (JIRA)" <ji...@apache.org> on 2015/04/23 22:27:39 UTC
[jira] [Updated] (DRILL-2860) Unable to cast integer column from
parquet file to interval day
[ https://issues.apache.org/jira/browse/DRILL-2860?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Victoria Markman updated DRILL-2860:
------------------------------------
Attachment: t1.parquet
> Unable to cast integer column from parquet file to interval day
> ---------------------------------------------------------------
>
> Key: DRILL-2860
> URL: https://issues.apache.org/jira/browse/DRILL-2860
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Reporter: Victoria Markman
> Assignee: Daniel Barclay (Drill)
> Attachments: t1.parquet
>
>
> I can cast numeric literal to "interval day":
> {code}
> 0: jdbc:drill:schema=dfs> select cast(1 as interval day) from t1;
> +------------+
> | EXPR$0 |
> +------------+
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> +------------+
> 10 rows selected (0.122 seconds)
> {code}
> Get an error when I'm trying to do the same from parquet file:
> {code}
> 0: jdbc:drill:schema=dfs> select cast(a1 as interval day) from t1 where a1 = 1;
> Query failed: SYSTEM ERROR: Invalid format: "1"
> Fragment 0:0
> [6a4adf04-f3db-4feb-8010-ebc3bfced1e3 on atsqa4-134.qa.lab:31010]
> (java.lang.IllegalArgumentException) Invalid format: "1"
> org.joda.time.format.PeriodFormatter.parseMutablePeriod():326
> org.joda.time.format.PeriodFormatter.parsePeriod():304
> org.joda.time.Period.parse():92
> org.joda.time.Period.parse():81
> org.apache.drill.exec.test.generated.ProjectorGen180.doEval():77
> org.apache.drill.exec.test.generated.ProjectorGen180.projectRecords():62
> org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.doWork():170
> org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():93
> org.apache.drill.exec.physical.impl.project.ProjectRecordBatch.innerNext():130
> org.apache.drill.exec.record.AbstractRecordBatch.next():144
> org.apache.drill.exec.physical.impl.validate.IteratorValidatorBatchIterator.next():118
> org.apache.drill.exec.physical.impl.BaseRootExec.next():74
> org.apache.drill.exec.physical.impl.ScreenCreator$ScreenRoot.innerNext():80
> org.apache.drill.exec.physical.impl.BaseRootExec.next():64
> org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():198
> org.apache.drill.exec.work.fragment.FragmentExecutor$1.run():192
> java.security.AccessController.doPrivileged():-2
> javax.security.auth.Subject.doAs():415
> org.apache.hadoop.security.UserGroupInformation.doAs():1469
> org.apache.drill.exec.work.fragment.FragmentExecutor.run():192
> org.apache.drill.common.SelfCleaningRunnable.run():38
> java.util.concurrent.ThreadPoolExecutor.runWorker():1145
> java.util.concurrent.ThreadPoolExecutor$Worker.run():615
> java.lang.Thread.run():745
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> If I try casting a1 to an integer I run into drill-2859
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)