You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Wenzhuang Zhu (Jira)" <ji...@apache.org> on 2025/06/30 03:30:00 UTC

[jira] [Comment Edited] (CALCITE-7053) In HepPlanner, move down the collectGarbage to topological order for better optimizer performance

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

Wenzhuang Zhu edited comment on CALCITE-7053 at 6/30/25 3:29 AM:
-----------------------------------------------------------------

Actually, depth-first requires garbage collection if the {{getParent}} call affects the {{HepPlanner}} results.

I fixed this problem in our internal system, but I  haven't have time to share the code with the community over the past three months.

I will share the complete solution later at https://issues.apache.org/jira/browse/CALCITE-6907 if there are more people working on HepPlanner latency  for large plan.


was (Author: JIRAUSER295386):
Actually, depth-first requires garbage collection if the {{getParent}} call affects the {{HepPlanner}} results.

I fixed this problem in our internal system, but I  haven't have time to share the code with the community over the past three months.

{*}{*}I will share the complete solution later at https://issues.apache.org/jira/browse/CALCITE-6907 if there are more people working on HepPlanner latency  for large plan.

> In HepPlanner, move down the collectGarbage to topological order for better optimizer performance
> -------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-7053
>                 URL: https://issues.apache.org/jira/browse/CALCITE-7053
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: xiong duan
>            Assignee: xiong duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.41.0
>
>
> According to the java comment in HepPlanner#getGraphIterator:
> {code:java}
>     // Make sure there's no garbage, because topological sort
>     // doesn't start from a specific root, and rules can't
>     // deal with firing on garbage.
>     // FIXME jvs 25-Sept-2006:  I had to move this earlier because
>     // of FRG-215, which is still under investigation.  Once we
>     // figure that one out, move down to location below for
>     // better optimizer performance.
> {code}
> Based on the current implementation, I haven't found the reason why the depth-first order requires garbage collection every time. Since it always starts the search from a specific
> Vertex, the issue mentioned the FRG-215 -
>  I haven't found any description or information about this problem. Therefore, this PR attempts to delegate the collectGarbage operation to the topological order.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)