Skip to content

[Syntax Compatibility] TableIdentifier does not support double quotes #46

@hungtcs

Description

@hungtcs

The following SQL can be executed in clickhouse-cli, but is not parsed correctly

panic: line 0:43 <EOF> or ';' was expected, but got: "."
select table_name from "information_schema"."tables" limit 1
                                           ^
image

Note that TableIdentifier supports double quotes, but not single quotes.

select table_name from "tables" limit 1 -- valid
select table_name from 'tables' limit 1 -- single quotes is valid
select table_name from information_schema.tables limit 1 -- valid
select table_name from "information_schema"."tables" limit 1 -- valid
select table_name from information_schema."tables" limit 1 -- valid
select table_name from "information_schema".tables limit 1 -- valid

select table_name from 'information_schema'.'tables' limit 1 -- !!! single quotes is invalid
select table_name from 'information_schema'.tables limit 1 -- !!! single quotes is invalid
select table_name from information_schema.'tables' limit 1 -- !!! single quotes is invalid

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions