[ 
https://issues.apache.org/jira/browse/CALCITE-6933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939900#comment-17939900
 ] 

Julian Hyde commented on CALCITE-6933:
--------------------------------------

It is not strictly true that “quoted identifiers should be looked up using case 
sensitive matching”. There are policies for whether quoted and unquoted 
identifiers have their case preserved, converted to upper or lower case, and 
also for whether identifiers are matched case-sensitively. 



These policies are good and should remain. (We didn’t invent them; the policies 
are mapped out in the JDBC specification for database metadata.)



The above does appear to be a bug, so perhaps the policies are imperfectly 
implemented. 

> Quoted identifiers should be looked up using case sensitive matching
> --------------------------------------------------------------------
>
>                 Key: CALCITE-6933
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6933
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.39.0
>            Reporter: Mihai Budiu
>            Priority: Minor
>
> Consider the following example:
> {code:sql}
> CREATE TABLE "T" (COL1 INT NOT NULL);
> CREATE TABLE "t" (COL1 INT NOT NULL, COL2 DOUBLE NOT NULL);
> CREATE VIEW V AS SELECT COL1, rlike(COL2, 'asf') FROM "t";
> {code}
> There are two tables with the same name, but different casing. I believe that 
> the lookup in the schema should use case-sensitive lookup when the looked-up 
> identifier is quoted. (This example used to work, but fails after we have 
> merged the fix to https://issues.apache.org/jira/browse/CALCITE-6728).
> I am assuming this is a bug, but perhaps my understanding is wrong.
> Today the IdentifierNamespace.resolveImpl uses a nameMatcher whose case 
> sensitivity is fixed by the configuration, but I think it should take into 
> consideration the quoting as well.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to