You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2016/08/16 07:37:44 UTC

[GitHub] spark pull request #14661: [SPARK-16991][SQL] Fix Outer Join Elimination whe...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-16991][SQL] Fix Outer Join Elimination when Filter's isNotNull Constraints Unable to Filter Out All Null-supplying Rows

    ### What changes were proposed in this pull request?
    This PR is to fix an incorrect outer join elimination when filter's `isNotNull` constraints is unable to filter out all null-supplying rows. For example, `isnotnull(coalesce(b#227, c#238))`.
    
    Users can hit this error when they try to use `using/natural outer join`, which is converted to a normal outer join with a `coalesce` expression on the `using columns`. For example, 
    ```Scala
        val a = Seq((1, 2), (2, 3)).toDF("a", "b")
        val b = Seq((2, 5), (3, 4)).toDF("a", "c")
        val c = Seq((3, 1)).toDF("a", "d")
        val ab = a.join(b, Seq("a"), "fullouter")
        ab.join(c, "a").explain(true)
    ```
    The dataframe `ab` is doing `using full-outer join`, which is converted to a normal outer join with a `coalesce` expression. Constraints inference generates a `Filter` with constraints `isnotnull(coalesce(b#227, c#238))`. Then, it triggers a wrong outer join elimination and generates a wrong result.
    ```
    Project [a#251, b#227, c#237, d#247]
    +- Join Inner, (a#251 = a#246)
       :- Project [coalesce(a#226, a#236) AS a#251, b#227, c#237]
       :  +- Join FullOuter, (a#226 = a#236)
       :     :- Project [_1#223 AS a#226, _2#224 AS b#227]
       :     :  +- LocalRelation [_1#223, _2#224]
       :     +- Project [_1#233 AS a#236, _2#234 AS c#237]
       :        +- LocalRelation [_1#233, _2#234]
       +- Project [_1#243 AS a#246, _2#244 AS d#247]
          +- LocalRelation [_1#243, _2#244]
    
    == Optimized Logical Plan ==
    Project [a#251, b#227, c#237, d#247]
    +- Join Inner, (a#251 = a#246)
       :- Project [coalesce(a#226, a#236) AS a#251, b#227, c#237]
       :  +- Filter isnotnull(coalesce(a#226, a#236))
       :     +- Join FullOuter, (a#226 = a#236)
       :        :- LocalRelation [a#226, b#227]
       :        +- LocalRelation [a#236, c#237]
       +- LocalRelation [a#246, d#247]
    ```
    
    **A note to the `Committer`**, please also give the credit to @dongjoon-hyun who submitted another PR for fixing this issue. https://github.com/apache/spark/pull/14580
    
    
    ### How was this patch tested?
    Added test cases

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

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

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

    https://github.com/apache/spark/pull/14661.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 #14661
    
----
commit a537dd07823339e63a10e6628f333f44fa528b54
Author: gatorsmile <ga...@gmail.com>
Date:   2016-08-16T07:17:09Z

    fix.

----


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    @nsyca `filter.constraints` is not a superset of `filter.conditions`. We are doing the same in the rule `InferFiltersFromConstraints`: https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/Optimizer.scala#L756


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #64379 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64379/consoleFull)** for PR 14661 at commit [`ebc79fc`](https://github.com/apache/spark/commit/ebc79fcb3981cfcaaf40450358a5b6c369e27132).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    @rxin @hvanhovell Moved the test cases. Just let me know if any change is needed. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix ...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14661#discussion_r76141512
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala ---
    @@ -2586,6 +2586,63 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
           Row(s"$expected") :: Nil)
       }
     
    +  test("SPARK-16991: Full outer join followed by inner join produces wrong results") {
    +    val a = Seq((1, 2), (2, 3)).toDF("a", "b")
    +    val b = Seq((2, 5), (3, 4)).toDF("a", "c")
    +    val c = Seq((3, 1)).toDF("a", "d")
    +    val ab = a.join(b, Seq("a"), "fullouter")
    +    checkAnswer(ab.join(c, "a"), Row(3, null, 4, 1) :: Nil)
    +  }
    +
    +  test("SPARK-17099: Incorrect result when HAVING clause is added to group by query") {
    --- End diff --
    
    move these over to SQLQueryTestSuite?



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #64378 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64378/consoleFull)** for PR 14661 at commit [`cedabd5`](https://github.com/apache/spark/commit/cedabd5a31837cd6a87255ef6b385b6695a8f145).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64378/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix ...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14661#discussion_r76142885
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala ---
    @@ -2586,6 +2586,63 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
           Row(s"$expected") :: Nil)
       }
     
    +  test("SPARK-16991: Full outer join followed by inner join produces wrong results") {
    +    val a = Seq((1, 2), (2, 3)).toDF("a", "b")
    +    val b = Seq((2, 5), (3, 4)).toDF("a", "c")
    +    val c = Seq((3, 1)).toDF("a", "d")
    +    val ab = a.join(b, Seq("a"), "fullouter")
    +    checkAnswer(ab.join(c, "a"), Row(3, null, 4, 1) :: Nil)
    +  }
    +
    +  test("SPARK-17099: Incorrect result when HAVING clause is added to group by query") {
    --- End diff --
    
    We backported it.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/64379/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

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


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #64378 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64378/consoleFull)** for PR 14661 at commit [`cedabd5`](https://github.com/apache/spark/commit/cedabd5a31837cd6a87255ef6b385b6695a8f145).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Will do it soon. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #64379 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/64379/consoleFull)** for PR 14661 at commit [`ebc79fc`](https://github.com/apache/spark/commit/ebc79fcb3981cfcaaf40450358a5b6c369e27132).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    @gatorsmile could you add cases for both [SPARK-17099](https://issues.apache.org/jira/browse/SPARK-17099) and [SPARK-17120](https://issues.apache.org/jira/browse/SPARK-17120)?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #63833 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63833/consoleFull)** for PR 14661 at commit [`a537dd0`](https://github.com/apache/spark/commit/a537dd07823339e63a10e6628f333f44fa528b54).


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    cc @hvanhovell @yhuai @dongjoon-hyun @nsyca 
    
    also cc the original reviewers: @davies @sameeragarwal @marmbrus 
    
    Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Merged build finished. Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    **[Test build #63833 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/63833/consoleFull)** for PR 14661 at commit [`a537dd0`](https://github.com/apache/spark/commit/a537dd07823339e63a10e6628f333f44fa528b54).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark pull request #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix ...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14661#discussion_r76142656
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala ---
    @@ -2586,6 +2586,63 @@ class SQLQuerySuite extends QueryTest with SharedSQLContext {
           Row(s"$expected") :: Nil)
       }
     
    +  test("SPARK-16991: Full outer join followed by inner join produces wrong results") {
    +    val a = Seq((1, 2), (2, 3)).toDF("a", "b")
    +    val b = Seq((2, 5), (3, 4)).toDF("a", "c")
    +    val c = Seq((3, 1)).toDF("a", "d")
    +    val ab = a.join(b, Seq("a"), "fullouter")
    +    checkAnswer(ab.join(c, "a"), Row(3, null, 4, 1) :: Nil)
    +  }
    +
    +  test("SPARK-17099: Incorrect result when HAVING clause is added to group by query") {
    --- End diff --
    
    I thought Spark 2.0.1 did not have `SQLQueryTestSuite`. Let me do it now. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    cc @sameeragarwal 


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/63833/
    Test PASSed.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by nsyca <gi...@git.apache.org>.
Github user nsyca commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    This code change looks good to me. The logic in
    
    ``
    filter.constraints.filter(_.isInstanceOf[IsNotNull])
          .exists(expr => join.left.outputSet.intersect(expr.references).nonEmpty)
    ``
    is useless here. Checking just an ISNOTNULL() predicate that has an argument from the left table is not sufficient to make the conclusion that the predicate will filter null rows from the left table. Likewise for the same logic checking on the right table.
    
    One minor comment: Does filter.constraints subsume filter.condition? By the reading of the lazy evaluation of the ``val constraints`` in ``QueryPlan.scala`` and the ``override protected def validConstraints`` in ``case class Filter``, I think it does. If so, then the ``++`` in the ``val conditions`` at line 1331 is redundant. It could just be changed to ``val conditions = filter.constraints``.
    
    I will not monitor this PR until my return on 8/29.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SPARK-17099][SPARK-17120][SQL] Fix Outer J...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    LGTM - merging to master/2.0. Thanks!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] spark issue #14661: [SPARK-16991][SQL] Fix Outer Join Elimination when Filte...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the issue:

    https://github.com/apache/spark/pull/14661
  
    LGTM - pending test cases for SPARK-17099 and SPARK-17120.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org