[
https://issues.apache.org/jira/browse/CALCITE-2087?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16292364#comment-16292364
]
Volodymyr Vysotskyi commented on CALCITE-2087:
----------------------------------------------
Drill does not instantiate {{SchemaPlus}} directly, it is instantiated through
the {{CalciteSchema}} instance. It is a wrapper around {{CalciteSchema}} which
contains our own schema implementations of {{Schema}} interface. This
{{Schema}} implementation contains configs required for impersonation, so we
need to pass this {{SchemaPlus}} instance to be able to create
{{CatalogReader}} instance with this schema.
Views with impersonation is one of the major Drill features and thus this
change is critical for Drill. Without it, we won't be able to use pure Calcite.
If you have another solution for this problem, I will be glad to discuss it.
> 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)