[
https://issues.apache.org/jira/browse/CALCITE-2087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289784#comment-16289784
]
Volodymyr Vysotskyi commented on CALCITE-2087:
----------------------------------------------
Yes, I considered this case, but our implementation of {{ViewExpander}} may be
only passed into {{SqlToRelConverter}} constructor, so here appears problem
that we could not operate our custom implementation and pass the desired
{{SchemaPlus}} instance, since we don't know its value at the moment of
creation of {{ViewExpander}} and method {{expandView()}} is called on the inner
anonymous class of
{{[SqlToRelConverter|https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql2rel/SqlToRelConverter.java#L3190]}}
class when we know {{SchemaPlus}} value.
> Add new method to ViewExpander interface to allow passing SchemaPlus
> --------------------------------------------------------------------
>
> Key: CALCITE-2087
> URL: https://issues.apache.org/jira/browse/CALCITE-2087
> Project: Calcite
> Issue Type: Improvement
> Reporter: Volodymyr Vysotskyi
> Assignee: Julian Hyde
>
> Currently, {{ViewExpander}} interface contains single method
> {{expandView(RelDataType rowType, String queryString, List<String>
> schemaPath, List<String> viewPath)}} which allows creating a {{RelNode}}
> instance that corresponds to the desired view.
> Drill supports impersonation for views and it is implemented in such a way,
> that its configs such as username, etc are stored in {{SchemaPlus}} instance.
> So currently it is not possible to pass these configs into this method to
> create {{CatalogReader}} and allow impersonation work.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)