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

Julian Hyde commented on CALCITE-1336:
--------------------------------------

Your proposal and my proposal would both break existing code. But yours would 
change the API, so the breakage would be more obvious. :)

Now I've looked at the code, I remember what is the purpose of the 
{{List<String> schemaPath}} parameter. It is the schema in which to look for 
tables referenced in the SQL. It is not necessarily the same as the schema in 
which the view is being defined. So, I propose the following:

{code}
RelRoot expandView(
        RelDataType rowType,
        String queryString,
        SchemaPlus rootSchema,
        List<String> schemaPath,
        List<String> viewPath);
{code}

> Add view name to the ViewExpander
> ---------------------------------
>
>                 Key: CALCITE-1336
>                 URL: https://issues.apache.org/jira/browse/CALCITE-1336
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Julien Le Dem
>            Assignee: Julian Hyde
>
> The ViewExpander.expandView() call already has the schema path that contains 
> the view but not the view name itself.
> In some context it is useful to also know the name of the view being expanded.
> current call:
> {code}
> RelRoot expandView(
>         RelDataType rowType,
>         String queryString,
>         SchemaPlus rootSchema,
>         List<String> schemaPath);
> {code}
> proposed:
> {code}
> RelRoot expandView(
>         RelDataType rowType,
>         String queryString,
>         SchemaPlus rootSchema,
>         List<String> schemaPath,
>         String viewName);
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to