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

Julian Hyde commented on CALCITE-1679:
--------------------------------------

It's worth fixing this one, since, as you say, some DBs use schemes where 
catalog or schema is always empty.

But be careful - if I recall correctly, we treat empty strings differently 
because the root schema has a name that is an empty string. I was wrong to tie 
this logic to the name being empty, but we still need to treat the root schema 
differently.

> Schemas.path does not traverse schemas with empty-string name
> -------------------------------------------------------------
>
>                 Key: CALCITE-1679
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1679
>             Project: Calcite
>          Issue Type: Improvement
>    Affects Versions: 1.11.0
>            Reporter: Kevin Liew
>            Assignee: Julian Hyde
>            Priority: Minor
>              Labels: view
>
> {{Schemas.path}} does not traverse schemas with empty-string name but the 
> parsed schema path may be relative to some nested schema with an empty name 
> rather than been relative to the input root-schema.
> ie.
> {{rootSchema}} is {{"CATALOG"}}
> the view table full-path is {{"CATALOG".""."VIEW"}} (the schema name is empty)
> {{names}} is {{("VIEW")}}
> {{Schemas.path}} will fail as it tries to find {{"VIEW"}} relative to 
> {{rootSchema}} but does not try to traverse the intermediate schema.
> If the first value in {{names}} is not found, we should try to traverse all 
> prepending schema with empty-string name.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to