GitHub user gatorsmile opened a pull request:

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

    [SPARK-23274] [SQL] Fix ReplaceExceptWithFilter when the right's Filter 
contains the references that are not in the left output

    ## What changes were proposed in this pull request?
    This PR is to fix the `ReplaceExceptWithFilter` rule when the right's 
Filter contains the references that are not in the left output.
    
    Before this PR, we got the error like
    ```
    java.util.NoSuchElementException: key not found: a
      at scala.collection.MapLike$class.default(MapLike.scala:228)
      at scala.collection.AbstractMap.default(Map.scala:59)
      at scala.collection.MapLike$class.apply(MapLike.scala:141)
      at scala.collection.AbstractMap.apply(Map.scala:59)
    ```
    
    After this PR, `ReplaceExceptWithFilter ` will not take an effect in this 
case. 
    
    ## How was this patch tested?
    Added tests

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

    $ git pull https://github.com/gatorsmile/spark fixReplaceExceptWithFilter

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

    https://github.com/apache/spark/pull/20444.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 #20444
    
----
commit 41bd3e00d1c31a36cd4565d41dc8e28165e5afe6
Author: gatorsmile <gatorsmile@...>
Date:   2018-01-31T00:50:30Z

    fix.

----


---

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

Reply via email to