Whole file
David-Wobrock/sqlvalidator
The author described this change as “Don't fail on Windows Function with Order By clause”. It counts as a record because the check below fails on the code as it stood at 38b24cb4c and passes on acb966b77, with nothing else changed between the two runs.
ProjectDavid-Wobrock/sqlvalidator
Fix saved2021-11-14
Sharing licenceMIT · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Don't fail on Windows Function with Order By clause
The change
| 705 | 705 | for partition in self.partition_by: | |
| 706 | 706 | errors += partition.validate(known_fields) | |
| 707 | 707 | if self.order_by: | |
| 708 | - | errors += self.order_by.validate(known_fields) | |
| 708 | + | errors += self.order_by.validate(known_fields, None) | |
| 709 | 709 | return errors | |
| 710 | 710 | ||
| 711 | 711 |
The check that tells the two apart
fail→pass·tests/integration/test_validation.py::test_partition_by_with_order_by
Check file tests/integration/test_validation.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it38b24cb4c4a427a9f666e343faa015499cb3cc2d
Broken version dated2021-11-14
Modulesqlvalidator.grammar.sql
Units changedAnalyticsClause
Fingerprinte66173aea6934143
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in David-Wobrock/sqlvalidator
- 2022-04-15Fix #38 -- Handle nested case expressions
- 2021-12-22Fix #29 -- Handle strings containing others quotes
- 2021-12-22Fix #35 -- Handle index based access on function call
- 2021-12-22Fix #34 -- Handle parsing a function with a single comma string
- 2021-11-15Fix validating between predicate conditions
- 2021-11-15Fix handling Any return type as invalid WHERE/HAVING condition