You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Aitozi (Jira)" <ji...@apache.org> on 2023/03/10 03:07:00 UTC

[jira] [Created] (FLINK-31390) Optimize the FlinkChangelogModeInferenceProgram by avoiding unnecessary traversals.

Aitozi created FLINK-31390:
------------------------------

             Summary: Optimize the FlinkChangelogModeInferenceProgram by avoiding unnecessary traversals.
                 Key: FLINK-31390
                 URL: https://issues.apache.org/jira/browse/FLINK-31390
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner
            Reporter: Aitozi


We can avoid the unnecessary traversals of the RelNode tree, since we are only interested in the first satisfied plan.

 

FlinkChangelogModeInferenceProgram
{code:java}
    val updateKindTraitVisitor = new SatisfyUpdateKindTraitVisitor(context)
    val finalRoot = requiredUpdateKindTraits.flatMap {
      requiredUpdateKindTrait =>
        updateKindTraitVisitor.visit(rootWithModifyKindSet, requiredUpdateKindTrait)
    }
{code}



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