[ https://issues.apache.org/jira/browse/CALCITE-2247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16479871#comment-16479871 ]
Julian Hyde commented on CALCITE-2247: -------------------------------------- I've reviewed again, and I still have one problem. It is not valid to simplify {{x <> 1 OR x = 1}} to TRUE, even with unknownAsFalse. If x is NULL, that expression evaluates to UNKNOWN. If unknownAsFalse, then that UNKNOWN becomes FALSE. I rebased your change on top of my dev branch for CALCITE-2314 (see https://github.com/julianhyde/calcite/tree/2314-verify-rex), and that issue shows up as the sole failing test. > Add rule to push in condition condition into a related disjunctive expression > ----------------------------------------------------------------------------- > > Key: CALCITE-2247 > URL: https://issues.apache.org/jira/browse/CALCITE-2247 > Project: Calcite > Issue Type: Improvement > Reporter: Zoltan Haindrich > Assignee: Zoltan Haindrich > Priority: Major > > Simplify expressions like: {code}a = 1 AND (a = 1 OR a = 2){code} to {code}a > = 1{code} > Conditions to apply will be: > * in an AND condition there exists a comparison(c) and an OR (o) > * o and c only reference 1 variable > See HIVE-19097 for more info. -- This message was sent by Atlassian JIRA (v7.6.3#76005)