This repository was archived by the owner on Feb 21, 2024. It is now read-only.
Commit f490589
committed
unbreak nested joins
It turns out that the problem with nested joins was that we were
trying to cleverly invert them, but that seems to be incorrect and
resulted in incorrect nesting.
The test case for this is
SELECT * FROM X INNER JOIN Y ON true INNER JOIN Z ON false
this is now parsed as
(X inner join Y on true) inner join z on false
Which, as it turns out, is the structure that stringizes back to the
original statement.
We were previously parsing it as
X inner join (y inner join z on false) on true
which stringizes out to a different form, and is also, I think,
just straightforwardly not what we want.
So basically, we had special case code to recognize that we
were doing a join on top of another join, and invert them in
some way, and I have no idea why because that seems not to be
correct, or at least, it produces nonsensical stringizing that
we can't then parse.1 parent 3f7ae75 commit f490589
2 files changed
Lines changed: 21 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2419 | 2419 | | |
2420 | 2420 | | |
2421 | 2421 | | |
2422 | | - | |
2423 | | - | |
2424 | | - | |
2425 | | - | |
2426 | | - | |
2427 | | - | |
2428 | | - | |
2429 | | - | |
2430 | | - | |
2431 | | - | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
2436 | | - | |
2437 | | - | |
| 2422 | + | |
2438 | 2423 | | |
2439 | 2424 | | |
2440 | 2425 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2055 | 2055 | | |
2056 | 2056 | | |
2057 | 2057 | | |
2058 | | - | |
2059 | | - | |
2060 | | - | |
2061 | | - | |
2062 | | - | |
2063 | | - | |
2064 | | - | |
2065 | | - | |
2066 | | - | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
2067 | 2066 | | |
2068 | 2067 | | |
2069 | 2068 | | |
2070 | 2069 | | |
2071 | | - | |
2072 | | - | |
2073 | | - | |
2074 | | - | |
2075 | | - | |
2076 | | - | |
2077 | | - | |
2078 | | - | |
2079 | | - | |
2080 | | - | |
2081 | | - | |
2082 | | - | |
| 2070 | + | |
| 2071 | + | |
2083 | 2072 | | |
2084 | 2073 | | |
2085 | 2074 | | |
2086 | 2075 | | |
2087 | 2076 | | |
2088 | 2077 | | |
2089 | | - | |
| 2078 | + | |
| 2079 | + | |
| 2080 | + | |
| 2081 | + | |
| 2082 | + | |
| 2083 | + | |
| 2084 | + | |
| 2085 | + | |
| 2086 | + | |
| 2087 | + | |
2090 | 2088 | | |
2091 | 2089 | | |
2092 | 2090 | | |
| |||
0 commit comments