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 <[email protected]>
Gerrit-Reviewer: Alex Behm <[email protected]>
Gerrit-Reviewer: Bharath Vissapragada <[email protected]>
Gerrit-Reviewer: Marcel Kornacker <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-HasComments: No

Reply via email to