impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-2190: [DOCS] from timestamp() and to timestamp()
Date Fri, 06 Oct 2017 03:48:12 GMT
Alex Behm has posted comments on this change. ( )

Change subject: IMPALA-2190: [DOCS] from_timestamp() and to_timestamp()

Patch Set 2:

File docs/topics/impala_datetime_functions.xml:
PS2, Line 791:             For efficient date and time calculations, where possible you store
Strange sentence: either?
PS2, Line 794:             into arbitrary formats for reporting purposes.
into arbitrary string formats
PS2, Line 797:             Because Impala implicitly converts string values in the recognized
<codeph>yyyy-MM-dd HH:mm:ss</codeph>
Slightly inaccurate. I'd recommend rephrasing to something like:

Because Impala implicitly converts string values to TIMESTAMP, you can directly reformat date/times
in the standard string format <codeph>yyyy-MM-dd HH:mm:ss</codeph> to a different
string format using from_timestamp().

(The inaccuracy is that Impala implicitly converts string to timestamp regardless of whether
the string actually is in the standard date/time format, e.g. select from_timestamp('garbage',
'yyyy/MM/dd') is

The format also allows for milliseconds, using SSS, e.g.
select from_timestamp(now(), 'yyyy/MM/dd HH:mm:ss.SSS');
PS2, Line 799:             dates/times directly to a different format in your query output.
to a different format using from_timestamp()
PS2, Line 815: -- Reformat string literal representing date/time.
Nice example!
PS2, Line 824: select from_timestamp('1984-09-25', 'MMM dd, yyyy');
Might be good to have a complete example that makes use of all the timestamp pieces (including
HH mm ss and SSS).
PS2, Line 2188:             A string argument, plus another string argument representing the
Need to document the pattern pieces and their meaning, e.g.:

mmm -> month
dd -> day

To view, visit
To unsubscribe, visit

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I5f6dfd3fb99a70975d712bbef6c05900eddadd27
Gerrit-Change-Number: 8046
Gerrit-PatchSet: 2
Gerrit-Owner: John Russell <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Andre Calfa <>
Gerrit-Reviewer: Greg Rahn <>
Gerrit-Comment-Date: Fri, 06 Oct 2017 03:48:12 +0000
Gerrit-HasComments: Yes

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