Uh oh!
There was an error while loading. Please reload this page.
[SPARK-38918][SQL][3.2] Nested column pruning should filter out attributes that do not belong to the current relation - #36386
Conversation
viirya
commented
May 1, 2022
@allisonwang-db Can you fix the test failure? |
allisonwang-db
commented
May 3, 2022
@viirya I tried a few times but can't reproduce this TPCDSV1_4_PlanStabilitySuite test failure locally... |
viirya
commented
May 3, 2022
@allisonwang-db Maybe you can just re-trigger the CI? |
viirya
commented
May 7, 2022
Hmm, from the logs, seems there are unmatched plans: |
viirya
commented
May 7, 2022
@allisonwang-db I can reproduce it locally by running |
There was a problem hiding this comment.
Seems cosmetic change only in the explain string?
There was a problem hiding this comment.
Yes and there is no plan change
viirya
commented
May 9, 2022
CI still doesn't pass: |
allisonwang-db
commented
May 9, 2022
Hmm let me try again |
allisonwang-db
commented
May 10, 2022
This test failure is strange. When I ran it individually (for q4 and q5), it failed but when I ran the entire suite together |
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Hi, @allisonwang-db . Could you rebase this PR once more, please?
15c9ccc to
9652212Compareallisonwang-db
commented
May 24, 2022
@dongjoon-hyun Looks like it still has the same issue: # Test passed
build/sbt "sql/testOnly *PlanStabilitySuite"# Test failed for q4 and q5
build/sbt "sql/testOnly *PlanStabilitySuite -- -z (tpcds-v1.4/q5)" |
dongjoon-hyun
commented
May 24, 2022
Thank you for rechecking. |
olaky
commented
Jun 7, 2022
I am facing the same issues here: #36753 |
olaky
commented
Jun 7, 2022
So the only change in the plan I can see that makes the test fail is that the last plan node has a source filename in it now, for example
|
viirya
commented
Jun 10, 2022
Can #36828 help on stablizing |
dongjoon-hyun
commented
Jun 10, 2022
+1 for @viirya 's comment. @cloud-fan found the root cause and is fixing now on that PR. |
dongjoon-hyun
commented
Jun 10, 2022
We can revisit this PR after merging that PR. |
viirya
commented
Jun 10, 2022
@allisonwang-db#36828 is merged, can you rebase to trigger CI? Thanks. |
… that do not belong to the current relation This PR updates `ProjectionOverSchema` to use the outputs of the data source relation to filter the attributes in the nested schema pruning. This is needed because the attributes in the schema do not necessarily belong to the current data source relation. For example, if a filter contains a correlated subquery, then the subquery's children can contain attributes from both the inner query and the outer query. Since the `RewriteSubquery` batch happens after early scan pushdown rules, nested schema pruning can wrongly use the inner query's attributes to prune the outer query data schema, thus causing wrong results and unexpected exceptions. To fix a bug in `SchemaPruning`. No Unit test Closesapache#36216 from allisonwang-db/spark-38918-nested-column-pruning. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com> (cherry picked from commit 150434b) Signed-off-by: Liang-Chi Hsieh <viirya@gmail.com> (cherry picked from commit 793ba60) Signed-off-by: allisonwang-db <allison.wang@databricks.com>
9652212 to
83dba72Compare…butes that do not belong to the current relation ### What changes were proposed in this pull request? Backport #36216 to branch-3.2 ### Why are the changes needed? To fix a bug in `SchemaPruning`. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit test Closes#36386 from allisonwang-db/spark-38918-branch-3.2. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
Merged to branch-3.2. Thank you so much, @allisonwang-db , @viirya . |
…butes that do not belong to the current relation ### What changes were proposed in this pull request? Backport apache#36216 to branch-3.2 ### Why are the changes needed? To fix a bug in `SchemaPruning`. ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Unit test Closesapache#36386 from allisonwang-db/spark-38918-branch-3.2. Authored-by: allisonwang-db <allison.wang@databricks.com> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
What changes were proposed in this pull request?
Backport #36216 to branch-3.2
Why are the changes needed?
To fix a bug in
SchemaPruning.Does this PR introduce any user-facing change?
No
How was this patch tested?
Unit test