Whole file
andialbrecht/sqlparse
The author described this change as “Fix function grouping skipped for lowercase 'as' in CREATE TABLE AS SELECT”. It counts as a record because the check below fails on the code as it stood at f80af6a40 and passes on 111b35cff, with nothing else changed between the two runs.
Projectandialbrecht/sqlparse
Fix saved2026-07-22
Sharing licenceBSD-3-Clause · LICENSE
Change size+1 −1
What the code was meant to do, written into the code itself as a save note
Fix function grouping skipped for lowercase 'as' in CREATE TABLE AS SELECT
The change
| 381 | 381 | has_create = True | |
| 382 | 382 | if tmp_token.value.upper() == 'TABLE': | |
| 383 | 383 | has_table = True | |
| 384 | - | if tmp_token.value == 'AS': | |
| 384 | + | if tmp_token.value.upper() == 'AS': | |
| 385 | 385 | has_as = True | |
| 386 | 386 | if has_create and has_table and not has_as: | |
| 387 | 387 | return |
The check that tells the two apart
fail→pass·tests/test_grouping.py::test_grouping_alias_ctas_lowercase_as
Check file tests/test_grouping.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 itf80af6a4007f11ada847218df8c29dc859238290
Broken version dated2026-06-06
Modulesqlparse.engine.grouping
Units changedgroup_functions
Fingerprint4f15fade90b3b0ef
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 andialbrecht/sqlparse
- 2026-07-25Fix get_real_name for names with more than two dotted parts (#332)
- 2025-11-29StatementSplitter
- 2025-11-28StatementSplitter
- 2024-07-15StatementSplitter
- 2024-04-13Raise SQLParseError instead of RecursionError.
- 2024-04-13Fix Function.get_parameters(), add Funtion.get_window()