You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Daniel Barclay (Drill) (JIRA)" <ji...@apache.org> on 2015/06/30 22:05:05 UTC
[jira] [Resolved] (DRILL-2864) Unable to cast string literal with
the valid value in ISO 8601 format to interval
[ https://issues.apache.org/jira/browse/DRILL-2864?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Barclay (Drill) resolved DRILL-2864.
-------------------------------------------
Resolution: Duplicate
Closing as (now-)duplicate because subproblems have been reported in separate, superseding JIRA reports.
> Unable to cast string literal with the valid value in ISO 8601 format to interval
> ---------------------------------------------------------------------------------
>
> Key: DRILL-2864
> URL: https://issues.apache.org/jira/browse/DRILL-2864
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Data Types
> Affects Versions: 0.9.0
> Reporter: Victoria Markman
> Assignee: Daniel Barclay (Drill)
> Fix For: 1.2.0
>
>
> {code}
> 0: jdbc:drill:schema=dfs> select cast('P1D' as interval day) from t1;
> Query failed: PARSE ERROR: From line 1, column 8 to line 1, column 34: Cast function cannot convert value of type CHAR(3) to type INTERVAL DAY
> [744f1f35-f8c5-46ba-80f9-0efd87036903 on atsqa4-134.qa.lab:31010]
> Error: exception while executing query: Failure while executing query. (state=,code=0)
> {code}
> Workaround: cast to varchar.
> {code}
> 0: jdbc:drill:schema=dfs> select cast(cast('P1D' as varchar(3)) as interval day) from t1;
> +------------+
> | EXPR$0 |
> +------------+
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> | P1D |
> +------------+
> 10 rows selected (0.191 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)