Zihao Ye has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/21568


Change subject: IMPALA-13203: Rewrite 'id = 0 OR false' as expected
......................................................................

IMPALA-13203: Rewrite 'id = 0 OR false' as expected

Currently, ExprRewriter cannot rewrite 'id = 0 OR false' to 'id = 0' as
expected. More precisely, it fails to rewrite any cases where a boolean
literal follows 'AND/OR' as expected.
The issue is that the CompoundPredicate generated by NormalizeExprsRule
is not analyzed, causing SimplifyConditionalsRule to skip the rewrite.
This patch fixes the issue by adding analysis of the rewritten
CompoundPredicate in NormalizeExprsRule.

Testing:
- Modified and passed FE test case
  ExprRewriteRulesTest#testCompoundPredicate

Change-Id: I9d9fffdd1cc644cc2b48f08c2509f22a72362d22
---
M fe/src/main/java/org/apache/impala/rewrite/NormalizeExprsRule.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
2 files changed, 14 insertions(+), 8 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/68/21568/1
--
To view, visit http://gerrit.cloudera.org:8080/21568
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d9fffdd1cc644cc2b48f08c2509f22a72362d22
Gerrit-Change-Number: 21568
Gerrit-PatchSet: 1
Gerrit-Owner: Zihao Ye <[email protected]>

Reply via email to