andialbrecht / sqlparse

A non-validating SQL parser module for Python
BSD 3-Clause "New" or "Revised" License
3.63k stars 685 forks source link

Parses select incorrectly when column name = column_name #728

Closed andrrreasss closed 11 months ago

andrrreasss commented 11 months ago

when parsing this query select column_name, column_value from my_table

column_name has type Token, not Identifier

andialbrecht commented 11 months ago

COLUMN_NAME is a reserved keyword in MySQL and therefore parsed as a keyword.