Attila Jeges has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/13996 )

Change subject: IMPALA-7375: [DOCS] Added DATE functions
......................................................................


Patch Set 2:

(7 comments)

http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml
File docs/topics/impala_datetime_functions.xml:

http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@405
PS2, Line 405: <b>Purpose:</b> Alias for the <codeph>NOW()</codeph> function.
             :           <p>
             :             <b>Return type:</b> <codeph>DATE</codeph>
CURRENT_DATE() is not an alias for NOW(), the former returns a DATE, while the 
latter returns a TIMESTAMP.

CURRENT_DATE() is equivalent to CAST(now() as DATE);


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@814
PS2, Line 814: TIMESTAMP
TIMESTAMP or DATE


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@848
PS2, Line 848: DATE'2019-08-02
Closing apostrophe is missing.


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@849
PS2, Line 849: 2000-01-01 00:00:00
This should be 2001-01-01.


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@1002
PS2, Line 1002: startdate
Parameter is called 'date' in L1007


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@1960
PS2, Line 1960: <codeph>MONTHS_SUB(DATE'2019-03-01',
              :             1)</codeph> returns 
<codeph>DATE'2019-02-28'</codeph>.
A better example would be MONTHS_SUB(DATE'2019-02-28', 1) returning 2019-01-31.


http://gerrit.cloudera.org:8080/#/c/13996/2/docs/topics/impala_datetime_functions.xml@3296
PS2, Line 3296: If <varname>date</varname> is not valid, e.g. 
<codeph>DATE'2019-03-32'</codeph>,
              :             returns <codeph>NULL</codeph>.
Again, the invalid date literal ill return an analysis error:

ERROR: AnalysisException: Invalid date literal: '2019-03-32'



--
To view, visit http://gerrit.cloudera.org:8080/13996
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I1463731f9ee7fb9ec80d6be2458cffe5c42464b6
Gerrit-Change-Number: 13996
Gerrit-PatchSet: 2
Gerrit-Owner: Alex Rodoni <arod...@cloudera.com>
Gerrit-Reviewer: Alex Rodoni <arod...@cloudera.com>
Gerrit-Reviewer: Attila Jeges <atti...@cloudera.com>
Gerrit-Reviewer: Csaba Ringhofer <csringho...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
Gerrit-Reviewer: Zoltan Borok-Nagy <borokna...@cloudera.com>
Gerrit-Comment-Date: Tue, 13 Aug 2019 12:00:46 +0000
Gerrit-HasComments: Yes

Reply via email to