Paul Rogers created IMPALA-7952:
-----------------------------------

             Summary: Planner creates non-normalized binary predicates
                 Key: IMPALA-7952
                 URL: https://issues.apache.org/jira/browse/IMPALA-7952
             Project: IMPALA
          Issue Type: Bug
          Components: Frontend
    Affects Versions: Impala 3.1.0
            Reporter: Paul Rogers
            Assignee: Paul Rogers


The FE has a "normalize binary predicates" rule that puts slots on the left 
hand side:

{noformat}
1 = id --> id = 1
{noformat}

Presumably this is useful. As the planner proceeds, it creates additional 
binary predicates, but tends to create them in the non-normalized form.

Examples:

* {{Expr.trySubstitute()}}
* {{StmtRewriter.createJoinConjunct()}}
* {{SingleNodePlanner.getNormalizedEqPred()}}

Once rewrite rules are integrated into analysis, we end up with a conflict: 
should expressions created internally be exempt from some or all of the rewrite 
rules? Even from mandatory rules, such as this one?

The solution is to allow such expressions to be rewritten to normalized form as 
part of the new integrate analyze-and-rewrite logic.

Note that the {{trySubstitute()}} case needs more attention. Presumably the 
expressions put into the "smap" are analyzed, hence rewritten. If not, then 
there are probably other subtle bugs lurking in that code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to