GitHub user jiangxb1987 opened a pull request:

    https://github.com/apache/spark/pull/18020

    [SPARK-20700][SQL] InferFiltersFromConstraints stackoverflows for query (v2)

    ## What changes were proposed in this pull request?
    
    In the previous approach we used `aliasMap` to link an `Attribute` to the 
expression with potentially the form `f(a, b)`, but we only searched the 
`expressions` and `children.expressions` for this, which is not enough when an 
`Alias` may lies deep in the logical plan. In that case, we can't generate the 
valid equivalent constraint classes and thus we fail at preventing the 
recursive deductions.
    
    We fix this problem by collecting all `Alias`s from the logical plan.
    
    ## How was this patch tested?
    
    No additional test case is added, but do modified one test case to cover 
this senerio.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jiangxb1987/spark inferConstrants

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/18020.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #18020
    
----
commit cac83e7ecb5a0c0fff097eda6e438819d9658d73
Author: Xingbo Jiang <[email protected]>
Date:   2017-05-17T17:24:24Z

    bugfix

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to