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
{{ message }}
Repository navigation
Single quoted literal with alias generates wrong tokens #518
The expected tokens are:
1 Identifier with tokens containing a Single and an Identifier
Expected tokens are generated correctly when the 'AS' keword is used:
SELECT 'fixed_text' AS ALIAS1 FROM .......
If there are many fields in the select list, the behavior remains, but Identifier or IdentifierList tokens are generated before and/or after the Single:
SELECT 'fixed_text' ALIAS1, field1, field2 FROM .......
Will generate 1 Single and 1 IdentifierList, the IdentifierList will contain 3 Identifiers (ALIAS1, field1 and field2)
SELECT field1, field2, 'fixed_text' ALIAS1 FROM .......
Will generate 1 IdentifierList (field1, field2, 1 Single), 1 Identifier (ALIAS1)
i made it by adding "T.String.Single" to "ttypes" of "grouping.py::group_identifier()", but no further test.
i did this too, but it will take some Literal words in select (such as select "a" ...) into Identifier instead of Literal token, which seems reasonable.
Activity
yzjkzq commentedon Jul 8, 2020
same as
SELECT NULL ALIAS1, field1, field2 FROM .......
for oracle
yzjkzq commentedon Jul 9, 2020
i made it by adding "T.String.Single" to "ttypes" of "grouping.py::group_identifier()", but no further test.
BlackWatchuser commentedon Jun 9, 2021
i did this too, but it will take some Literal words in select (such as select "a" ...) into Identifier instead of Literal token, which seems reasonable.