impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Impala Public Jenkins (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3894: Change the behavior parsing date "YY"
Date Thu, 03 Aug 2017 02:20:49 GMT
Impala Public Jenkins has submitted this change and it was merged.

Change subject: IMPALA-3894: Change the behavior parsing date "YY"

IMPALA-3894: Change the behavior parsing date "YY"

This patch change the behavor when running unix_timestamp(string, string)
function. Before the change Impala directly adds 2000 to the year parsed.
Behavior after change is the same as Hive's, shifting the parsed date
into the interval [current time - 80 years, current time + 20 years).
In 2017, given query
> select from_unixtime(unix_timestamp('31-AUG-94', 'dd-MMM-yy'),'yyyyMMdd');
Impala would output 20940831 before the change and 19940831 with this
patch applied. unix_timestamp function with other forms of parameters
is not affected.
Hive's impelentation can be found at:
It uses SimpleDateFormat, documented at:

Test: add 4 test cases to, testing the edge cases of
2-year format.

Change-Id: I5da761255915dc741f1dcc488fd4ef6ecc385896
Reviewed-by: Matthew Jacobs <>
Tested-by: Impala Public Jenkins
M be/src/exprs/
M be/src/runtime/
M be/src/runtime/timestamp-parse-util.h
M be/src/runtime/
4 files changed, 53 insertions(+), 2 deletions(-)

  Impala Public Jenkins: Verified
  Matthew Jacobs: Looks good to me, approved

To view, visit
To unsubscribe, visit

Gerrit-MessageType: merged
Gerrit-Change-Id: I5da761255915dc741f1dcc488fd4ef6ecc385896
Gerrit-PatchSet: 17
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Tianyi Wang <>
Gerrit-Reviewer: Greg Rahn <>
Gerrit-Reviewer: Impala Public Jenkins
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Tianyi Wang <>
Gerrit-Reviewer: Tim Armstrong <>

View raw message