impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <ger...@cloudera.org>
Subject [Impala-ASF-CR] IMPALA-1286: Extract common conjuncts from disjunctions.
Date Tue, 08 Nov 2016 20:51:02 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-1286: Extract common conjuncts from disjunctions.
......................................................................


Patch Set 5:

Thanks for the explanation and your patience. I'm certainly open to learning more about a
cleaner design.

For the most part, the output type of an Expr is determined by its input types.

Sounds like we need to sit together and flesh out the future direction a little more. I'm
still not sure I follow how your example would solve the CTAS problem. Can a LITERAL(2) be
inserted into a column with a TINYINT column?

I think there is actually a more severe problem than the ones you identified. Expr optimizations
can potentially change the result of a query. I believe this is true even with our existing
expr substitution logic. Here's one example:

bool_col OR bool_col --> bool_col

The original Expr will return FALSE when bool_col is NULL, but the new Expr will return NULL.
We can come up with other such examples.
Dealing with NULLs is generally tricky when transforming Exprs.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I3cf9b950afaa3fd753d1b09ba5e540b5258940ad
Gerrit-PatchSet: 5
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Alex Behm <alex.behm@cloudera.com>
Gerrit-Reviewer: Bharath Vissapragada <bharathv@cloudera.com>
Gerrit-Reviewer: Marcel Kornacker <marcel@cloudera.com>
Gerrit-Reviewer: Tim Armstrong <tarmstrong@cloudera.com>
Gerrit-HasComments: No

Mime
View raw message