Repository navigation
Commit db8a5fd
committed
refactor: centralize join-input table-scan filter extraction before unparse recursion
Both the left and right join inputs in select_to_sql_recursively duplicated the
same try_transform_to_simple_table_scan_with_filters dispatch (extend the
collected filters, then return the simplified or original plan). Extract it into
an extract_join_input_table_scan_filters helper and call it from both sides,
while keeping the side-specific passthrough-projection handling (left unwrap,
right nested-join relation) inline and explicit.
Also factor the shared three-table setup in the nested passthrough-projection
join tests into a helper, and add a left-input test mirroring the existing
right-input coverage.
Closes apache#23159
Signed-off-by: Jiawei Zhao <[email protected]>1 parent 96ff37a commit db8a5fd
2 files changed
Lines changed: 77 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
587 | 600 | | |
588 | 601 | | |
589 | 602 | | |
| |||
1153 | 1166 | | |
1154 | 1167 | | |
1155 | 1168 | | |
1156 | | - | |
1157 | | - | |
1158 | | - | |
1159 | | - | |
1160 | | - | |
1161 | | - | |
1162 | | - | |
1163 | | - | |
| 1169 | + | |
| 1170 | + | |
| 1171 | + | |
| 1172 | + | |
1164 | 1173 | | |
1165 | 1174 | | |
1166 | 1175 | | |
| |||
1181 | 1190 | | |
1182 | 1191 | | |
1183 | 1192 | | |
1184 | | - | |
1185 | | - | |
1186 | | - | |
1187 | | - | |
1188 | | - | |
1189 | | - | |
1190 | | - | |
1191 | | - | |
| 1193 | + | |
| 1194 | + | |
| 1195 | + | |
| 1196 | + | |
1192 | 1197 | | |
1193 | 1198 | | |
1194 | 1199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2736 | 2736 | | |
2737 | 2737 | | |
2738 | 2738 | | |
2739 | | - | |
2740 | | - | |
2741 | | - | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
2742 | 2742 | | |
2743 | 2743 | | |
2744 | 2744 | | |
| |||
2755 | 2755 | | |
2756 | 2756 | | |
2757 | 2757 | | |
| 2758 | + | |
| 2759 | + | |
| 2760 | + | |
| 2761 | + | |
| 2762 | + | |
| 2763 | + | |
| 2764 | + | |
2758 | 2765 | | |
2759 | 2766 | | |
2760 | 2767 | | |
| |||
2793 | 2800 | | |
2794 | 2801 | | |
2795 | 2802 | | |
| 2803 | + | |
| 2804 | + | |
| 2805 | + | |
| 2806 | + | |
| 2807 | + | |
| 2808 | + | |
| 2809 | + | |
| 2810 | + | |
| 2811 | + | |
| 2812 | + | |
| 2813 | + | |
| 2814 | + | |
| 2815 | + | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
| 2820 | + | |
| 2821 | + | |
| 2822 | + | |
| 2823 | + | |
| 2824 | + | |
| 2825 | + | |
| 2826 | + | |
| 2827 | + | |
| 2828 | + | |
| 2829 | + | |
| 2830 | + | |
| 2831 | + | |
| 2832 | + | |
| 2833 | + | |
| 2834 | + | |
| 2835 | + | |
| 2836 | + | |
| 2837 | + | |
| 2838 | + | |
| 2839 | + | |
| 2840 | + | |
| 2841 | + | |
| 2842 | + | |
| 2843 | + | |
| 2844 | + | |
| 2845 | + | |
| 2846 | + | |
| 2847 | + | |
| 2848 | + | |
2796 | 2849 | | |
2797 | 2850 | | |
2798 | 2851 | | |
| |||
0 commit comments