Repository navigation
Commit aed227a
authored
fix(rules): end the SQLCLEAN053 ON scan at a PIVOT USING list (#24)
* fix(rules): end the SQLCLEAN053 ON scan at a PIVOT USING list
A DuckDB PIVOT ... ON list is followed by USING aggregates, which the
ON clause scan treated as aggregates inside a join condition.
* perf(rules): find SET assignments in one forward pass
The null comparison check scanned backwards from every comparison to
find its clause, which is quadratic in long queries.1 parent 65eb3f3 commit aed227a
3 files changed
Lines changed: 34 additions & 13 deletions
File tree
- crates/sqlclean/src
- sql_lint/_helpers
- sql_quality
- _helpers
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1876 | 1876 | | |
1877 | 1877 | | |
1878 | 1878 | | |
| 1879 | + | |
1879 | 1880 | | |
1880 | 1881 | | |
1881 | 1882 | | |
1882 | 1883 | | |
1883 | | - | |
| 1884 | + | |
1884 | 1885 | | |
1885 | 1886 | | |
1886 | 1887 | | |
1887 | 1888 | | |
1888 | 1889 | | |
1889 | 1890 | | |
1890 | 1891 | | |
1891 | | - | |
1892 | | - | |
1893 | | - | |
1894 | | - | |
1895 | | - | |
| 1892 | + | |
| 1893 | + | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
1896 | 1899 | | |
1897 | | - | |
1898 | | - | |
1899 | | - | |
1900 | | - | |
1901 | | - | |
1902 | | - | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
1903 | 1909 | | |
1904 | 1910 | | |
1905 | 1911 | | |
1906 | | - | |
| 1912 | + | |
1907 | 1913 | | |
1908 | 1914 | | |
1909 | 1915 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
702 | 702 | | |
703 | 703 | | |
704 | 704 | | |
| 705 | + | |
705 | 706 | | |
706 | 707 | | |
707 | 708 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
174 | 188 | | |
175 | 189 | | |
176 | 190 | | |
| |||
0 commit comments