Csaba Ringhofer has uploaded a new patch set (#2). ( 
http://gerrit.cloudera.org:8080/18718 )

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

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 note 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

Change-Id: I6cc1c851ee71ab4fcc58105c7e9931155a483679
---
M be/src/exprs/expr-test.cc
M be/src/exprs/timestamp-functions-ir.cc
M be/src/exprs/timestamp-functions.h
M be/src/runtime/date-parse-util.cc
M be/src/runtime/datetime-simple-date-format-parser.cc
M be/src/runtime/datetime-simple-date-format-parser.h
M be/src/runtime/timestamp-parse-util.cc
M be/src/runtime/timestamp-parse-util.h
M common/function-registry/impala_functions.py
9 files changed, 110 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/18/18718/2
--
To view, visit http://gerrit.cloudera.org:8080/18718
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6cc1c851ee71ab4fcc58105c7e9931155a483679
Gerrit-Change-Number: 18718
Gerrit-PatchSet: 2
Gerrit-Owner: Csaba Ringhofer <csringho...@cloudera.com>

Reply via email to