Commit accde83
[SPARK-50598][SQL] An initial, no-op PR which adds new parameters to already existing classes UnresolvedWith, CTERelationRef and CTERelationDef to enable later implementation of recursive CTEs
### What changes were proposed in this pull request?
PR adds new parameters to already existing classes UnresolvedWith, CTERelationRef and CTERelationDef to enable later implementation of recursive CTEs.
- Additional parameters are added in pattern matching cases in other files of mentioned classes as well.
- A large number of trivial changes in tests was required, due to new parameters introduced to the classes, which are also addressed in this PR.
- More information for reviewers can be found here: https://docs.google.com/document/d/1qcEJxqoXcr5cSt6HgIQjWQSqhfkSaVYkoDHsg5oxXp4/edit
### Why are the changes needed?
Support for the recursive CTE.
### Does this PR introduce _any_ user-facing change?
No. RECURSIVE keyword is not introduced in this PR.
### How was this patch tested?
The tests failing after the initial change were all in `SQLQueryTestSuite`, so this patch was tested by running this Test Suite.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #49180 from milanisvet/milanrcte2.
Authored-by: Milan Cupac <milan.cupac@outlook.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>1 parent 63c7ca4 commit accde83
20 files changed
Lines changed: 351 additions & 340 deletions
File tree
- sql
- catalyst/src/main/scala/org/apache/spark/sql/catalyst
- analysis
- optimizer
- plans/logical
- core/src/test/resources/sql-tests/analyzer-results
- postgreSQL
- subquery
- exists-subquery
- in-subquery
- scalar-subquery
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
152 | | - | |
| 152 | + | |
153 | 153 | | |
154 | 154 | | |
155 | 155 | | |
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
205 | | - | |
| 205 | + | |
206 | 206 | | |
207 | 207 | | |
208 | 208 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
125 | | - | |
| 125 | + | |
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
Lines changed: 14 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
833 | 833 | | |
834 | 834 | | |
835 | 835 | | |
| 836 | + | |
836 | 837 | | |
837 | 838 | | |
838 | 839 | | |
839 | | - | |
| 840 | + | |
| 841 | + | |
840 | 842 | | |
841 | 843 | | |
842 | 844 | | |
| |||
862 | 864 | | |
863 | 865 | | |
864 | 866 | | |
| 867 | + | |
| 868 | + | |
| 869 | + | |
| 870 | + | |
| 871 | + | |
865 | 872 | | |
866 | 873 | | |
867 | 874 | | |
868 | 875 | | |
869 | 876 | | |
870 | | - | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
871 | 880 | | |
872 | 881 | | |
873 | 882 | | |
| |||
891 | 900 | | |
892 | 901 | | |
893 | 902 | | |
| 903 | + | |
894 | 904 | | |
895 | 905 | | |
896 | 906 | | |
897 | 907 | | |
898 | 908 | | |
899 | 909 | | |
900 | | - | |
| 910 | + | |
| 911 | + | |
901 | 912 | | |
902 | 913 | | |
903 | 914 | | |
| |||
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
89 | | - | |
| 89 | + | |
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
| |||
0 commit comments