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
When executing a query like the below, the field Time has to be quoted as "Time" in all contexts because Time is one of the SQL reserved words and that's reflected in the partiql-lang-rust lexer.
Does not work
PartiQL> select Time/1000000.0 as "ms", RequestId, Operation from read_ion('service_log.2023-05-30-19.ion') as e where RequestId is not NULL limit 10;
× Error for query `select Time/1000000.0 as "ms", RequestId, Operation from read_ion('service_log.2023-05-30-19.ion') as e
│ where RequestId is not NULL limit 10`
Error: × PartiQL syntax error:
╭────
1 │ select Time/1000000.0 as "ms", RequestId, Operation from read_ion('service_log.2023-05-30-19.ion') as e where RequestId is not NULL limit 10
· ┬
· ╰── Unexpected token `/`
╰────
Does work
PartiQL> select "Time"/1000000.0 as "ms", RequestId, Operation from read_ion('service_log.2023-05-30-19.ion') as e where RequestId is not NULL
Some of the words in that list seem like they'll be very common as field/column names in real data, especially "value", "time", and "date". Those don't feel like keywords to my muscle memory, and from the list of SQL reserved words on Wikipedia it seems like several large RDBMSs may agree.
I think it would be worth it to allow at least those three identifiers to be used without requiring a quoted identifier, so I'm filing this issue to prompt a discussion.
Please feel free to edit/discard this issue as appropriate.
The text was updated successfully, but these errors were encountered:
When executing a query like the below, the field
Time
has to be quoted as"Time"
in all contexts becauseTime
is one of the SQL reserved words and that's reflected in the partiql-lang-rust lexer.Does not work
Does work
Some of the words in that list seem like they'll be very common as field/column names in real data, especially "value", "time", and "date". Those don't feel like keywords to my muscle memory, and from the list of SQL reserved words on Wikipedia it seems like several large RDBMSs may agree.
I think it would be worth it to allow at least those three identifiers to be used without requiring a quoted identifier, so I'm filing this issue to prompt a discussion.
Please feel free to edit/discard this issue as appropriate.
The text was updated successfully, but these errors were encountered: