You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by maropu <gi...@git.apache.org> on 2018/04/25 04:26:47 UTC
[GitHub] spark pull request #21148: [SPARK-24079][SQL] Update the nullability of Join...
GitHub user maropu opened a pull request:
https://github.com/apache/spark/pull/21148
[SPARK-24079][SQL] Update the nullability of Join output based on inferred predicates
## What changes were proposed in this pull request?
This pr added code to update the nullability of `Join.output` based on inferred predicates in `InferFiltersFromConstraints`. In the master, a logical `Join` node does not respect the nullability that the optimizer rule `InferFiltersFromConstraints` might change when inferred predicates have `IsNotNull`,
e.g.,
```
scala> val df1 = Seq((Some(1), Some(2))).toDF("k", "v0")
scala> val df2 = Seq((Some(1), Some(3))).toDF("k", "v1")
scala> val joinedDf = df1.join(df2, df1("k") === df2("k"), "inner")
scala> joinedDf.explain
== Physical Plan ==
*(2) BroadcastHashJoin [k#83], [k#92], Inner, BuildRight
:- *(2) Project [_1#80 AS k#83, _2#81 AS v0#84]
: +- *(2) Filter isnotnull(_1#80)
: +- LocalTableScan [_1#80, _2#81]
+- BroadcastExchange HashedRelationBroadcastMode(List(cast(input[0, int, true] as bigint)))
+- *(1) Project [_1#89 AS k#92, _2#90 AS v1#93]
+- *(1) Filter isnotnull(_1#89)
+- LocalTableScan [_1#89, _2#90]
scala> joinedDf.queryExecution.optimizedPlan.output.map(_.nullable)
res15: Seq[Boolean] = List(true, true, true, true)
```
But, these `nullable` values should be:
```
scala> joinedDf.queryExecution.optimizedPlan.output.map(_.nullable)
res15: Seq[Boolean] = List(false, true, false, true)
```
This ticket comes from the previous discussion: https://github.com/apache/spark/pull/18576#pullrequestreview-107585997
## How was this patch tested?
Added tests in `UpdateNullabilityInAttributeReferencesSuite`.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/maropu/spark UpdateJoinNullability
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/21148.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 #21148
----
commit 240ae7a976f03ce58bcdeed34f8022ebfea23a4c
Author: Takeshi Yamamuro <ya...@...>
Date: 2018-04-02T08:07:52Z
Fix
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #97737 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97737/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
* This patch **fails due to an unknown error code, -9**.
* This patch **does not merge cleanly**.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #89818 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89818/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
* This patch **fails due to an unknown error code, -9**.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #97737 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97737/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89818/
Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Build finished. Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4209/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by HyukjinKwon <gi...@git.apache.org>.
Github user HyukjinKwon commented on the issue:
https://github.com/apache/spark/pull/21148
retest this please
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #97705 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97705/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
* This patch **fails due to an unknown error code, -9**.
* This patch **does not merge cleanly**.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #89833 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89833/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
* This patch passes all tests.
* This patch merges cleanly.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #97705 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97705/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97705/
Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2665/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #89818 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89818/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution-unified/4247/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Merged build finished. Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #89833 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/89833/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Build finished. Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the issue:
https://github.com/apache/spark/pull/21148
**[Test build #97773 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/97773/testReport)** for PR 21148 at commit [`240ae7a`](https://github.com/apache/spark/commit/240ae7a976f03ce58bcdeed34f8022ebfea23a4c).
* This patch **fails build dependency tests**.
* This patch **does not merge cleanly**.
* This patch adds no public classes.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Merged build finished. Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/97737/
Test FAILed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/2652/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org
[GitHub] spark issue #21148: [SPARK-24079][SQL] Update the nullability of Join output...
Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the issue:
https://github.com/apache/spark/pull/21148
Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/89833/
Test PASSed.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org