[
https://issues.apache.org/jira/browse/CALCITE-4514?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17292238#comment-17292238
]
Vladimir Sitnikov commented on CALCITE-4514:
--------------------------------------------
Well, it looks like {{getChildSets}} is used only for merging, and I wonder if
it really makes sense to build {{Set<RelSet>}} for the purpose of {{contains}}
only.
The size of {{RelSet}} can be tracked as {{int size}} field, and we do not need
to track all the rels.
---
The change claims to improve performance. Can there be a test case that
quantifies the improvement?
> Fine tune the merge order of two RelSets, cache RelSet's childSet computation
> -----------------------------------------------------------------------------
>
> Key: CALCITE-4514
> URL: https://issues.apache.org/jira/browse/CALCITE-4514
> Project: Calcite
> Issue Type: Improvement
> Reporter: Botong Huang
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> When merging two relsets, we have two preferences:
> 1. Merge parent relset into child relset
> 2. Merge newer relset into older relset
> Currently, when the two relsets are parent set of each other, we randomly
> pick a merge order without checking the second condition above. For
> performance reasons, we should, to avoid unnecessary churn.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)