Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Duplicate
-
0.9.0
-
None
Description
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)
Workaround: cast to varchar.
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)
Attachments
Issue Links
- is superceded by
-
DRILL-3430 CAST to interval type doesn't accept standard-format strings
- Open
-
DRILL-3431 CHAR not handled same as VARCHAR for cast to INTERVAL
- Open
-
DRILL-3432 Change or document: CAST to interval type doesn't reject non-standard strings
- Open