impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kim Jin Chul (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5237: support custom string in date/time format
Date Thu, 09 Nov 2017 00:24:52 GMT
Kim Jin Chul has uploaded this change for review. (

Change subject: IMPALA-5237: support custom string in date/time format

IMPALA-5237: support custom string in date/time format

Impala does not represent a custom string at date/time format. For example,
addtional custom string between the patterns(e.g. HH\'H\' => 11H)
Hive supports this feature, so user wants to get a same result
from Impala. By the way, Impala returns a different result as below.

* Hive
> select from_unixtime(1492677564, 'HH\'H\' mm\'M\' ss\'S\'');
08H 39M 24S

* Impala
> select from_unixtime(1492677564, 'HH\'H\' mm\'M\' ss\'S\'');
08'8' 39'4' 24'0'

The change affects the format pattern for from_unixtime/from_timestamp.

There is one intentional difference between Hive and Impala.
In Impala, the format string should have any date or time patten as below.

* Hive
> select from_unixtime(0, '\'Hello world!\'');
Hello world!

* Impala
> select from_unixtime(0, '\'Hello world!\'');
Bad date/time conversion format: 'Hello world!'

Add unit tests for working and nonworking cases

Change-Id: Ie34055ac695748bcfb110bfa6ed5308f469ea178
M be/src/exprs/
M be/src/runtime/
2 files changed, 28 insertions(+), 0 deletions(-)

  git pull ssh:// refs/changes/08/8508/1
To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie34055ac695748bcfb110bfa6ed5308f469ea178
Gerrit-Change-Number: 8508
Gerrit-PatchSet: 1
Gerrit-Owner: Kim Jin Chul <>

  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message