Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/8046 )
Change subject: IMPALA-2190: [DOCS] from_timestamp() and to_timestamp() ...................................................................... Patch Set 2: (7 comments) http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml File docs/topics/impala_datetime_functions.xml: http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@791 PS2, Line 791: For efficient date and time calculations, where possible you store temporal Strange sentence: either? http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@794 PS2, Line 794: into arbitrary formats for reporting purposes. into arbitrary string formats http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@797 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 accepted.you The format also allows for milliseconds, using SSS, e.g. select from_timestamp(now(), 'yyyy/MM/dd HH:mm:ss.SSS'); http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@799 PS2, Line 799: dates/times directly to a different format in your query output. to a different format using from_timestamp() http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@815 PS2, Line 815: -- Reformat string literal representing date/time. Nice example! http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@824 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). http://gerrit.cloudera.org:8080/#/c/8046/2/docs/topics/impala_datetime_functions.xml@2188 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 etc. -- To view, visit http://gerrit.cloudera.org:8080/8046 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings 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 <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Andre Calfa <[email protected]> Gerrit-Reviewer: Greg Rahn <[email protected]> Gerrit-Comment-Date: Fri, 06 Oct 2017 03:48:12 +0000 Gerrit-HasComments: Yes
