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

Change subject: IMPALA-7368: Add initial support for DATE type
......................................................................


Patch Set 19:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/12481/18/be/src/exprs/cast-functions-ir.cc
File be/src/exprs/cast-functions-ir.cc:

http://gerrit.cloudera.org:8080/#/c/12481/18/be/src/exprs/cast-functions-ir.cc@301
PS18, Line 301:         "The valid date range for the Timestamp type is 
1400-01-01..9999-12-31.");
> Maybe reword a bit:
Done


http://gerrit.cloudera.org:8080/#/c/12481/18/testdata/workloads/functional-query/queries/QueryTest/date.test
File testdata/workloads/functional-query/queries/QueryTest/date.test:

http://gerrit.cloudera.org:8080/#/c/12481/18/testdata/workloads/functional-query/queries/QueryTest/date.test@564
PS18, Line 564: # Impala returns the same results as PostgreSQL.
> I don't know if it matters but it looks like hive 3 also returns the same f
The main issue with the first and second expression in this select is that they 
return TIMESTAMPs in Impala and STRINGs in Hive3.

This is one of the subtle differences between how implicit casts work in Impala 
and Hive3. Impala implicitly converts all three parameters to TIMESTAMP, 
whereas Hive3 converts all three to STRING. Consequently the return types are 
different too. Unfortunately changing this behavior in Impala would break 
backward compatibility, as that would change TIMESTAMP behavior too, not just 
DATE behavior.

You are correct about the third expression: it returns a TIMESTAMP both in 
Impala and Hive3. Hive3's string representation of the TIMESTAMP contains an 
extra ".0" padding, but I don't think that matters. I've moved this expression 
to the previous section.



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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iea8155ef09557e0afa2f8b2d0b2dc9d0896dc30f
Gerrit-Change-Number: 12481
Gerrit-PatchSet: 19
Gerrit-Owner: Attila Jeges <atti...@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: Lars Volker <l...@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com>
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>
Gerrit-Comment-Date: Fri, 05 Apr 2019 13:41:25 +0000
Gerrit-HasComments: Yes

Reply via email to