Class FlinkRelUtil

java.lang.Object
org.apache.flink.table.planner.plan.utils.FlinkRelUtil

public class FlinkRelUtil extends Object
Utilities for RelNode.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static int[]
    initializeArray(int length, int initVal)
    Returns an int array with given length and initial value.
    static boolean
    isMergeable(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc)
    Return two neighbouring Calc can merge into one Calc or not.
    static boolean
    isMergeable(org.apache.calcite.rel.core.Filter topFilter, org.apache.calcite.rel.core.Calc bottomCalc)
    Return two neighbouring Filter and Calc can merge into one Calc or not.
    static boolean
    isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Calc bottomCalc)
    Return two neighbouring Project and Calc can merge into one Calc or not.
    static boolean
    isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Project bottomProject)
    Return two neighbouring Project can merge into one Project or not.
    static org.apache.calcite.rel.core.Calc
    merge(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc)
    Merges the programs of two Calc instances and returns a new Calc instance with the merged program.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • FlinkRelUtil

      public FlinkRelUtil()
  • Method Details

    • isMergeable

      public static boolean isMergeable(org.apache.calcite.rel.core.Filter topFilter, org.apache.calcite.rel.core.Calc bottomCalc)
      Return two neighbouring Filter and Calc can merge into one Calc or not. If the two nodes can merge into one, each non-deterministic RexNode of bottom Calc should appear at most once in the implicit project list and condition of top Filter.
    • isMergeable

      public static boolean isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Calc bottomCalc)
      Return two neighbouring Project and Calc can merge into one Calc or not. If the two nodes can merge into one, each non-deterministic RexNode of bottom Calc should appear at most once in the project list of top Project.
    • isMergeable

      public static boolean isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Project bottomProject)
      Return two neighbouring Project can merge into one Project or not. If the two Project can merge into one, each non-deterministic RexNode of bottom Project should appear at most once in the project list of top Project.
    • isMergeable

      public static boolean isMergeable(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc)
      Return two neighbouring Calc can merge into one Calc or not. If the two Calc can merge into one, each non-deterministic RexNode of bottom Calc should appear at most once in the project list of top Calc.
    • merge

      public static org.apache.calcite.rel.core.Calc merge(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc)
      Merges the programs of two Calc instances and returns a new Calc instance with the merged program.
    • initializeArray

      public static int[] initializeArray(int length, int initVal)
      Returns an int array with given length and initial value.
      Parameters:
      length - array length
      initVal - initial value
      Returns:
      initialized int array