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

godfrey he edited comment on CALCITE-2855 at 2/20/19 6:45 AM:
--------------------------------------------------------------

Yes. There is a cache to store previous metadata results for each RelNode in 
each RelMetadataQuery instance. We do meet serious performance problems on 
complex query (e.g. TPC-DS). 
There is a case: ColumnInterval is a new handler that returns the interval of 
given column for a RelNode, and a new Selectivity handler is implemented based 
on ColumnInterval. AFAIK, Selectivity handler is used by high frequency when 
computing cost in Calcite. A new extended RelMetadataQuery instance will be 
created each time when ColumnInterval is called in Selectivity, so the cache in 
extended RelMetadataQuery instance is unhelpful.


was (Author: godfreyhe):
Yes. There is a cache to store previous metadata results for each RelNode in 
each RelMetadataQuery instance. We do meet serious performance problems on 
complex query (e.g. TPC-DS). 
There is a case: ColumnInterval is a new handler that returns the interval of 
given column for a RelNode, and a new Selectivity handler is implemented based 
on ColumnInterval.  Selectivity handler is used by high frequency when 
computing cost in Calcite. A new extended RelMetadataQuery instance will be 
created each time when ColumnInterval is called in Selectivity, so the cache in 
extended RelMetadataQuery instance is unhelpful.

> Make RelOptCluster constructor public
> -------------------------------------
>
>                 Key: CALCITE-2855
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2855
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: godfrey he
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.19.0
>
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Expose RelOptCluster Constructor outside package to allow override.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to