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

Danny Chen commented on CALCITE-3425:
-------------------------------------

Thanks [~hyuan] for firing this issue, let's continue the discussion on the DEV 
mailing list.

> Inconsistent behavior of MetadataProvider in RelOptCluster
> ----------------------------------------------------------
>
>                 Key: CALCITE-3425
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3425
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Haisheng Yuan
>            Priority: Major
>
> To use customized metadata provider, we can do the following:
> {code:java}
> RelMetadataQuery.THREAD_PROVIDERS.set(
>       JaninoRelMetadataProvider.of(xxxmetadataProvider));
> {code}
> It only works for builtin metadata type, but for customized metadata, we 
> still get exception when retrieve the metadata using reflection. Because when 
> the RelOptCluster is created, it always use the default metadata provider, 
> instead of the customized one.
> {code:java}
> setMetadataProvider(DefaultRelMetadataProvider.INSTANCE);
> {code}
> It causes confusing. We have to set the provider in 2 places. Should we unify 
> them in a single place?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to