You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2019/10/17 22:08:00 UTC

[jira] [Created] (CALCITE-3425) Inconsistent behavior of MetadataProvider in RelOptCluster

Haisheng Yuan created CALCITE-3425:
--------------------------------------

             Summary: 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


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)