The Calcite SQL language reference (https://calcite.apache.org/docs/reference.html) says the following:
In Calcite, matching identifiers to the name of the referenced object is case-sensitive. But remember that unquoted identifiers are implicitly converted to upper case before matching, and if the object it refers to was created using an unquoted identifier for its name, then its name will have been converted to upper case also.
Is there some configuration to make both object creation and the query case insensitive? For example, if I have a table named countries
is it possible to configure the query validator to accept identifiers either COUNTRIES
or countries
in the SQL query?
I tried to configure the SqlParser
to case sensitive false
in the following:
Frameworks.newConfigBuilder().parserConfig(SqlParser.configBuilder().setCaseSensitive(false).build()).build()
and then passed this framework config to the PlannerImpl
used in SqlToRelConverter
, but the SQL validator still fails when I do not enclose the identifier in quotes to enforce case.