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.

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

381381 has_create = True
382382 if tmp_token.value.upper() == 'TABLE':
383383 has_table = True
384- if tmp_token.value == 'AS':
384+ if tmp_token.value.upper() == 'AS':
385385 has_as = True
386386 if has_create and has_table and not has_as:
387387 return

The check that tells the two apart

failpass·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