What’s the best way to convert this ISO 8601 timestamp to a drill timestamp
type?

Tried this:

0: jdbc:drill:> select to_timestamp('2016-01-08T15:00:15-05:00') from
sys.version;
Error: SYSTEM ERROR: DrillRuntimeException: Failure while
materializing expression in constant expression evaluator
[TO_TIMESTAMP('2016-01-08T15:00:15-05:00')].  Errors:
Error in expression at index -1.  Error: Missing function
implementation: [castTINYINT(VARCHAR-REQUIRED)].  Full expression:
--UNKNOWN EXPRESSION--.

[Error Id: 85cfdbb6-3b60-44a6-922c-acec0b5e1c18 on
se-node11.se.lab:31010] (state=,code=0)

and this:

0: jdbc:drill:> select to_timestamp('2016-01-08T15:00:15-05:00',
'yyyy-MM-ddTHH:mm:ssZ') from sys.version;
Error: SYSTEM ERROR: IllegalArgumentException: Illegal pattern component: T

[Error Id: b6b0cb7e-681c-4b34-a64f-788e16a7b157 on
se-node11.se.lab:31010] (state=,code=0)

How can I escape that T character? In Java I would escape it with the
single quote, but Drill won’t take that because the time format needs to be
wrapped in single quotes.

Chris mattacma...@mapr.com
215-701-3146
​

Reply via email to