[ 
https://issues.apache.org/jira/browse/CALCITE-7950?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated CALCITE-7950:
------------------------------------
    Labels: pull-request-available  (was: )

> RelMdUtil.clearCache should not create a RelMetadataQuery when the cluster 
> has none
> -----------------------------------------------------------------------------------
>
>                 Key: CALCITE-7950
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7950
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: Michael Braun
>            Priority: Trivial
>              Labels: pull-request-available
>
> HepRuleCall.transformTo invalidates the cluster's RelMetadataQuery. 
> HepPlanner then clears
> metadata caches for affected vertices via RelMdUtil.clearCache, which calls
> getMetadataQuery() and so creates a new instance. Its cache is empty, so 
> every clearCache
> returns false. Each transformation therefore allocates a RelMetadataQuery 
> just to do
> lookups that cannot succeed.
> Proposed change: add RelOptCluster.getMetadataQueryIfPresent(), which returns 
> the current
> instance or null without creating one, and have RelMdUtil.clearCache return 
> false when it
> is null. Behavior is unchanged; metadata reads still create the instance 
> lazily.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to