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)