Commit 9f2e46a
committed
[SPARK-59272][SQL][FOLLOWUP] Split the two refusal cases in the comments, and pin the new one
Three comment corrections from a review round, and the unit test the changed contract was
missing.
`createShuffleSpec` refuses to project any marked layout, but what the unprojected spec is then
good for differs between the two cases. Where every partition expression covers a clustering key
the spec is usable, and a consumer is laid out on this side's own key order. Where the layout
narrows, one `keyPositions` entry is empty and `canCreatePartitioning` and `areKeysCompatible`
both turn the spec away, which is what the sentence this commit brings back used to say. The
`@param joinKeyPositions` doc and the comment at the guard now split the two.
`ShuffleSpecSuite` gains the covering case beside the narrowing one it already had, so the
contract this PR changed is pinned at the unit that changed. It fails with the guard back at its
narrowing-only form.
The gate comment in `EnsureRequirements` loses a sentence fragment and the cost argument against
re-asking on the `compatibleAsIs` path. `describesSameKeys` walks the same keys on the push path,
so the reason that holds is the other one already given: there the children are the ones the
pairing read.
The `SPARK-59050` test comment numbered the shuffles wrong. The final join's own shuffle cannot
have existed while that join storage-partitioned, so before SPARK-59050 the plan held the first
and third of today's four. The fourth is that join's one-side shuffle, not a re-shuffle of a
regrouped side, since a declined pairing discards the node it tried.
Raised by dongjoon-hyun.1 parent f88b7bc commit 9f2e46a
4 files changed
Lines changed: 50 additions & 22 deletions
File tree
- sql
- catalyst/src
- main/scala/org/apache/spark/sql/catalyst/plans/physical
- test/scala/org/apache/spark/sql/catalyst
- core/src
- main/scala/org/apache/spark/sql/execution/exchange
- test/scala/org/apache/spark/sql/connector
Lines changed: 15 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
920 | | - | |
921 | | - | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
922 | 927 | | |
923 | 928 | | |
924 | 929 | | |
| |||
1770 | 1775 | | |
1771 | 1776 | | |
1772 | 1777 | | |
1773 | | - | |
1774 | | - | |
1775 | | - | |
1776 | | - | |
1777 | | - | |
1778 | | - | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
1779 | 1786 | | |
1780 | 1787 | | |
1781 | 1788 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
650 | 650 | | |
651 | 651 | | |
652 | 652 | | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
653 | 676 | | |
654 | 677 | | |
655 | 678 | | |
| |||
Lines changed: 9 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
804 | | - | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
| 803 | + | |
805 | 804 | | |
806 | 805 | | |
807 | 806 | | |
808 | 807 | | |
809 | 808 | | |
810 | | - | |
811 | | - | |
| 809 | + | |
| 810 | + | |
812 | 811 | | |
813 | 812 | | |
814 | 813 | | |
815 | 814 | | |
816 | 815 | | |
817 | | - | |
818 | 816 | | |
819 | 817 | | |
820 | 818 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8249 | 8249 | | |
8250 | 8250 | | |
8251 | 8251 | | |
8252 | | - | |
8253 | | - | |
8254 | | - | |
| 8252 | + | |
| 8253 | + | |
| 8254 | + | |
8255 | 8255 | | |
8256 | 8256 | | |
8257 | 8257 | | |
| |||
0 commit comments