[
https://issues.apache.org/jira/browse/IMPALA-9280?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17026141#comment-17026141
]
Riza Suminto commented on IMPALA-9280:
--------------------------------------
Code review is here: [https://gerrit.cloudera.org/c/15130/]
Citing the design doc at
[https://docs.google.com/document/d/1V7k6-lrPGW7_uhqM-FhKl3QsxwCRy69v2KIxPsGjc1k/edit#]
_If the last separator character in the separator substring is "-" and is
immediately followed_
_by a time zone hour (tzh) token, it's a negative sign and not counted as a
separator, UNLESS_
_this is the only possible separator character in the separator substring (in
which case it is_
_not counted as the tzh's negative sign)._
> Time string with signed TZH token preceded by dash cannot be cast to timestamp
> ------------------------------------------------------------------------------
>
> Key: IMPALA-9280
> URL: https://issues.apache.org/jira/browse/IMPALA-9280
> Project: IMPALA
> Issue Type: Bug
> Components: Backend
> Affects Versions: Impala 3.3.0
> Reporter: Jozsef Koza
> Assignee: Riza Suminto
> Priority: Minor
> Labels: newbie
>
> Given a time string containing a TZH token with a sign which is preceded
> immediately by a dash delimiter cannot be cast to timestamp.
> h3. To reproduce
> Execute {code:sql}
> select cast("08:00-+01" as timestamp format "HH:MI-TZH");{code} which results
> in *NULL*.
>
> ----
> It seems like the delimiter is incorrectly recognised as the sign of the
> timezone offset hour which prevents parsing the TZH value.
> Adding an additional delimiter (other than dash itself) between the dash
> separator and the sign in the time string makes cast working.
> Executing
> {code:sql}
> select cast("08:00- +01" as timestamp format "HH:MI-TZH");{code}
> results in *08:00:00*.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]