Uh oh!
There was an error while loading. Please reload this page.
[SPARK-13484][SQL] Prevent illegal NULL propagation when filtering outer-join results - #11371
[SPARK-13484][SQL] Prevent illegal NULL propagation when filtering outer-join results#11371maropu wants to merge 7 commits into
Conversation
SparkQA
commented
Feb 25, 2016
Test build #51972 has finished for PR 11371 at commit
|
SparkQA
commented
Feb 25, 2016
Test build #51976 has finished for PR 11371 at commit
|
maropu
commented
Feb 26, 2016
Jenkins, retest this please. |
mengxr
commented
Feb 26, 2016
cc @yhuai |
SparkQA
commented
Feb 26, 2016
Test build #52013 has finished for PR 11371 at commit
|
c305776 to
d3733baCompareSparkQA
commented
Feb 26, 2016
Test build #52034 has finished for PR 11371 at commit
|
SparkQA
commented
Feb 26, 2016
Test build #52035 has finished for PR 11371 at commit
|
yhuai
commented
Feb 26, 2016
@maropu Thank you for the PR. My thought is that we may need to have a place to correct those nullable fields in the analyzer. Let me also think about it. |
maropu
commented
Feb 27, 2016
@yhuai okay. |
maropu
commented
Feb 27, 2016
@yhuai I added a new role |
SparkQA
commented
Feb 27, 2016
Test build #52128 has finished for PR 11371 at commit
|
maropu
commented
Feb 29, 2016
Jenkins, retest this please. |
SparkQA
commented
Feb 29, 2016
Test build #52159 has finished for PR 11371 at commit
|
SparkQA
commented
Mar 1, 2016
Test build #52232 has finished for PR 11371 at commit
|
maropu
commented
Mar 2, 2016
Jenkins, retest this please. |
SparkQA
commented
Mar 2, 2016
Test build #52278 has finished for PR 11371 at commit
|
SparkQA
commented
Mar 2, 2016
Test build #52300 has finished for PR 11371 at commit
|
maropu
commented
Mar 6, 2016
@yhuai ping |
rxin
commented
Mar 15, 2016
cc @cloud-fan |
cloud-fan
commented
Mar 15, 2016
I think the fundamental problem is, we give users the resolved attribute but it may not be the real column when using it. For example, |
maropu
commented
Mar 23, 2016
@cloud-fan If your pull request (#11632) merged, I think the query in the top throws analysis exception, right? |
0549f88 to
1e45943CompareSparkQA
commented
Apr 15, 2016
Test build #55897 has finished for PR 11371 at commit
|
SparkQA
commented
Apr 15, 2016
Test build #55899 has finished for PR 11371 at commit
|
SparkQA
commented
Apr 15, 2016
Test build #55911 has finished for PR 11371 at commit
|
maropu
commented
May 13, 2016
Jenkins, retest this please. |
SparkQA
commented
May 13, 2016
Test build #58552 has finished for PR 11371 at commit
|
| def apply(plan: LogicalPlan): LogicalPlan = plan resolveOperators { | ||
| case q: LogicalPlan => | ||
| q.transform { | ||
| case f @ Filter(filterCondition, ExtractJoinOutputAttributes(join, joinOutputMap)) => |
There was a problem hiding this comment.
How about we use a q.transformUp to fix the nullability in a bottom-up way? For every node, we create an AttributeMap using the output of its child. Then, we use transformExpressions to fix the nullability if necessary. Let me try it out and ping you when I have a version.
There was a problem hiding this comment.
https://github.com/apache/spark/pull/13290/files This is the approach that I mentioned above.
…ter-join results ## What changes were proposed in this pull request? This PR add a rule at the end of analyzer to correct nullable fields of attributes in a logical plan by using nullable fields of the corresponding attributes in its children logical plans (these plans generate the input rows). This is another approach for addressing SPARK-13484 (the first approach is #11371). Close #113711 Author: Takeshi YAMAMURO <linguin.m.s@gmail.com> Author: Yin Huai <yhuai@databricks.com> Closes#13290 from yhuai/SPARK-13484. (cherry picked from commit 5eea332) Signed-off-by: Cheng Lian <lian@databricks.com>
…ter-join results ## What changes were proposed in this pull request? This PR add a rule at the end of analyzer to correct nullable fields of attributes in a logical plan by using nullable fields of the corresponding attributes in its children logical plans (these plans generate the input rows). This is another approach for addressing SPARK-13484 (the first approach is #11371). Close #113711 Author: Takeshi YAMAMURO <linguin.m.s@gmail.com> Author: Yin Huai <yhuai@databricks.com> Closes#13290 from yhuai/SPARK-13484.
What changes were proposed in this pull request?
This pr is to prevent illegal NULL propagation in the query below;
It returns nothing because
b("count")is not nullable and the filter condition is always false byOptimizer.How was this patch tested?
Added a test for the query above in
DataFrameJoinSuite.