Author: Thomas Tauber-Marshall <firstname.lastname@example.org>
Date: Wed Dec 28 15:15:10 2016 -0800
IMPALA-1861: Simplify conditionals with constant conditions
When there are conditionals with constant values of TRUE or
FALSE we can simplify them during analysis using the ExprRewriter.
This patch introduces the SimplifyConditionalsRule with covers IF,
OR, AND, CASE, and DECODE.
It also introduces NormalizeExprsRule which normalizes AND and OR
such that if either child is a BoolLiteral, then the left child is a
- Added unit tests to ExprRewriteRulesTest.
- Added functional tests to expr.test
- Ran FE planner tests and BE expr-test.
Reviewed-by: Jim Apple <email@example.com>
Tested-by: Impala Public Jenkins