You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
It appears that sqlparse is unable to parse an alter statement that aims to edit the row_format of a particular table. When looking at the tokens, it combines the name of the table and the row_format statement into a single token. Therefore, it is unable to correctly parse the statement.
The output will be as follows: [<DDL 'ALTER' at 0x7FEC4A7C4F40>, <Whitespace ' ' at 0x7FEC4A6C25E0>, <Keyword 'TABLE' at 0x7FEC4A6C2640>, <Whitespace ' ' at 0x7FEC4A6C26A0>, <Identifier 'mytabl...' at 0x7FEC4A730DD0>, <Comparison '=' at 0x7FEC4A6C2820>, <Keyword 'Dynamic' at 0x7FEC4A6C2880>, <Punctuation ';' at 0x7FEC4A6C28E0>]
Expected behavior
Notice how the Identifiermytabl... also contains the row_format in the same token. I believe that ROW_FORMAT should be its own token.
Versions (please complete the following information):
Python: [e.g. 3.8.10]
sqlparse: [e.g. 0.5.0]
The text was updated successfully, but these errors were encountered:
Describe the bug
It appears that sqlparse is unable to parse an alter statement that aims to edit the row_format of a particular table. When looking at the tokens, it combines the name of the table and the row_format statement into a single token. Therefore, it is unable to correctly parse the statement.
To Reproduce
Run this code snippet as a sample:
The output will be as follows:
[<DDL 'ALTER' at 0x7FEC4A7C4F40>, <Whitespace ' ' at 0x7FEC4A6C25E0>, <Keyword 'TABLE' at 0x7FEC4A6C2640>, <Whitespace ' ' at 0x7FEC4A6C26A0>, <Identifier 'mytabl...' at 0x7FEC4A730DD0>, <Comparison '=' at 0x7FEC4A6C2820>, <Keyword 'Dynamic' at 0x7FEC4A6C2880>, <Punctuation ';' at 0x7FEC4A6C28E0>]
Expected behavior
Notice how the
Identifier
mytabl...
also contains the row_format in the same token. I believe that ROW_FORMAT should be its own token.Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: