You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2023/03/27 23:02:00 UTC

[jira] [Commented] (IMPALA-9531) Drop support for "dateless timestamps"

    [ https://issues.apache.org/jira/browse/IMPALA-9531?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17705708#comment-17705708 ] 

ASF subversion and git services commented on IMPALA-9531:
---------------------------------------------------------

Commit ec7a834b378847251a37f98a1dfcfb18c004f1b4 in impala's branch refs/heads/branch-4.1.2 from Csaba Ringhofer
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=ec7a834b3 ]

IMPALA-11355: Add STRING overloads for hour/minute/second/millisecond

IMPALA-9531 dropped support for "dateless timestamps",
e.g. cast("12:05:05" as timestamp) now returns NULL.

This led to breaking functions like minute("12:05:05"), as minute()
expects a timestamp, and Impala adds an implicit cast, so what actually
happens is minute(cast("12:05:05" as timestamp)), which returns NULL.

This change adds overloads for similar functions that take STRING
instead of TIMESTAMP parameter. The same functions already take a
STRING parameter in Hive and mySQL.

The changes in the parser mainly restore code removed in IMPALA-9531.

Note that these functions could be potentially optimized by returning
parts of the parse result without converting them to boost time first,
but this is not done here to make the change minimal.

Testing:
- restored related tests in expr-test and added some new ones for
  malformed time-of-day strings
- added benchmarks for the new overloads and fixed the ones for the
  old functions (they tested NULL)

Change-Id: I6cc1c851ee71ab4fcc58105c7e9931155a483679
Reviewed-on: http://gerrit.cloudera.org:8080/18718
Reviewed-by: Riza Suminto <ri...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>


> Drop support for "dateless timestamps"
> --------------------------------------
>
>                 Key: IMPALA-9531
>                 URL: https://issues.apache.org/jira/browse/IMPALA-9531
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Backend
>            Reporter: Csaba Ringhofer
>            Assignee: Adam Tamas
>            Priority: Minor
>             Fix For: Impala 4.0.0
>
>
> Currently cast("15:42:00" as timestamp) doesn't return NULL, but it should, as the resulting timestamps are more or less useless:
> - other fileformats than text do not support them
> - most built-in unctions don't support them - even those where it could  make sense
> IMPALA-5942 contains more details about these issues.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org