drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Barclay (Drill) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-2864) Unable to cast string literal with the valid value in ISO 8601 format to interval
Date Tue, 30 Jun 2015 20:05:05 GMT

     [ 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)

Mime
View raw message