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)

Reply via email to