[ 
https://issues.apache.org/jira/browse/CALCITE-2441?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Hyde resolved CALCITE-2441.
----------------------------------
       Resolution: Fixed
    Fix Version/s: 1.18.0

Fixed in 
[9c26a9e7|http://git-wip-us.apache.org/repos/asf/calcite/commit/9c26a9e7].

If you want {{RelBuilder}} to expand views, then you can set its 
{{TableScanFactory}} on creation to something like that returned by 
{{RelFactories.expandingScanFactory}}. You still need to supply a 
{{ViewExpander}} if you want to expand starting from SQL; see 
{{PlannerTest.checkView}} for how to do that. If your expansion is relational 
algebra you build yourself it's a lot simpler.

> Relational algebra doesn't work with SQL views
> ----------------------------------------------
>
>                 Key: CALCITE-2441
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2441
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Andrei Sereda
>            Assignee: Julian Hyde
>            Priority: Major
>             Fix For: 1.18.0
>
>
> Query execution fails when one tries to use 
> [RelBuilder|https://calcite.apache.org/docs/algebra.html] on the top of SQL 
> view:
> {quote}
> Caused by: java.lang.UnsupportedOperationException
>  at org.apache.calcite.plan.RelOptUtil$4.expandView(RelOptUtil.java:2805)
>  at org.apache.calcite.schema.impl.ViewTable.expandView(ViewTable.java:124)
>  ... 36 more
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to