Author: Alex Behm <firstname.lastname@example.org>
Date: Mon Oct 17 23:01:57 2016 -0700
IMPALA-1286: Extract common conjuncts from disjunctions.
Adds a new ExprRewriteRule to extract common conjuncts from
(a AND b AND c) OR (b AND d) ==> b AND ((a AND c) OR (d))
(a AND b) OR (a AND b) ==> a AND b
(a AND b AND c) OR (c) ==> c
Adds a new query option ENABLE_EXPR_REWRITES to enable/disable
non-essential expr rewrites in the FE. Note that some rewrites
are required, e.g., BetweenToCompoundRule. Disabling the rewrites
is useful for testing, in particular, to make sure that the exprs
specified in expr-test.cc are executed as written.
Testing: Added a new unit test in ExprRewriteRulesTest.
Reviewed-by: Alex Behm <email@example.com>
Tested-by: Internal Jenkins