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

Jacques Nadeau commented on CALCITE-911:
----------------------------------------

[~jni], I wonder if you can post an updated patch that includes the 
SimpleCalciteSchema. The goal isn't really to create a larger api surface area. 

The main issue we're hitting against is that CalciteSchema was changed around 
1.0 so that it cached a huge amount of additional state internally. This was a 
substantial breaking change for Drill. Without major refactoring in Drill, we 
couldn't have the schema caching a bunch of state. As such, we needed to 
basically maintain the old implementation of Schema which was minimally 
stateful. This patch achieves that goal. To get off the fork, we need to either 
have two implementations, expose an api so we can have our own implementation 
or remove the caching. Any of the options seems fine. I probably the last since 
this can then be left to framework implementers (and keeps code as simple as 
possible). 

I think it is very important for interoperability (e.g. the Phoenix 
integration) so let's figure out the best we to solve this. 

> Make CalciteSchema extendible for different implementation.
> -----------------------------------------------------------
>
>                 Key: CALCITE-911
>                 URL: https://issues.apache.org/jira/browse/CALCITE-911
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Jinfeng Ni
>            Assignee: Jinfeng Ni
>
> CalciteSchema by default uses cache to store table, sub-schema, function. 
> This would work perfectly for schema-based system, yet would create problem 
> for Drill, which dynamically explore the schema on the fly during query 
> execution. 
> One solution is to refactor CalciteSchema and make it as an interface. The 
> default implementation would still use the current implementation. Further, 
> it would other system to extend the default behavior and make CalciteSchema 
> works for Drill as well. 
> Background information: The issue around CalciteSchema is one of the reasons 
> that Drill has to use a forked version of Calcite. Hopefully, if we could 
> resolve this issue, we are one step further to remove the forked Calcite in 
> the near future.
>  



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

Reply via email to