Github user KurtYoung commented on a diff in the pull request:

    https://github.com/apache/flink/pull/3559#discussion_r106796945
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkPlannerImpl.scala
 ---
    @@ -100,6 +101,7 @@ class FlinkPlannerImpl(
           assert(validatedSqlNode != null)
           val rexBuilder: RexBuilder = createRexBuilder
           val cluster: RelOptCluster = RelOptCluster.create(planner, 
rexBuilder)
    +      cluster.setMetadataProvider(FlinkDefaultRelMetadataProvider.INSTANCE)
    --- End diff --
    
    I remembered that in #3058 you also set the provider to 
`RelMetadataQuery.THREAD_PROVIDERS` by calling:
    ```
    
RelMetadataQuery.THREAD_PROVIDERS.set(JaninoRelMetadataProvider.of(cluster.getMetadataProvider))
    ```
    Why it's not needed here?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to