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

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


Patch Set 23: Code-Review+1

(1 comment)

Looked at the delta, good catch by csaba

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

http://gerrit.cloudera.org:8080/#/c/12481/19/be/src/exprs/cast-functions-ir.cc@312
PS19, Line 312:   if (UNLIKELY(!dv.IsValid())) {
              :     ctx->SetError("String to Date parse failed.");
              :     return DateVal::null();
              :   }
> Casts from STRING to most types don't return an error and don't emit a warn
Yeah this was a good point that I missed. We've tried to be stricter with new 
functionality, e.g. DECIMAL_V2 errors in more cases than before.

I think in principle we should avoid different behaviour between constants and 
variables, i.e. f(1) and f(x) where x=1 should have exactly the same behaviour. 
This is an invariant that most programmers would use to reason about their 
programs.

So the current patch's behaviour is good.



--
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: 23
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: Thu, 18 Apr 2019 00:31:34 +0000
Gerrit-HasComments: Yes

Reply via email to