Class FlinkRelUtil
java.lang.Object
org.apache.flink.table.planner.plan.utils.FlinkRelUtil
Utilities for
RelNode.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int[]initializeArray(int length, int initVal) Returns an int array with given length and initial value.static booleanisMergeable(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc) Return two neighbouringCalccan merge into oneCalcor not.static booleanisMergeable(org.apache.calcite.rel.core.Filter topFilter, org.apache.calcite.rel.core.Calc bottomCalc) Return two neighbouringFilterandCalccan merge into oneCalcor not.static booleanisMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Calc bottomCalc) Return two neighbouringProjectandCalccan merge into oneCalcor not.static booleanisMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Project bottomProject) Return two neighbouringProjectcan merge into oneProjector not.static org.apache.calcite.rel.core.Calcmerge(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc) Merges the programs of twoCalcinstances and returns a newCalcinstance with the merged program.
-
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 neighbouringFilterandCalccan merge into oneCalcor not. If the two nodes can merge into one, each non-deterministicRexNodeof bottomCalcshould appear at most once in the implicit project list and condition of topFilter. -
isMergeable
public static boolean isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Calc bottomCalc) Return two neighbouringProjectandCalccan merge into oneCalcor not. If the two nodes can merge into one, each non-deterministicRexNodeof bottomCalcshould appear at most once in the project list of topProject. -
isMergeable
public static boolean isMergeable(org.apache.calcite.rel.core.Project topProject, org.apache.calcite.rel.core.Project bottomProject) Return two neighbouringProjectcan merge into oneProjector not. If the twoProjectcan merge into one, each non-deterministicRexNodeof bottomProjectshould appear at most once in the project list of topProject. -
isMergeable
public static boolean isMergeable(org.apache.calcite.rel.core.Calc topCalc, org.apache.calcite.rel.core.Calc bottomCalc) Return two neighbouringCalccan merge into oneCalcor not. If the twoCalccan merge into one, each non-deterministicRexNodeof bottomCalcshould appear at most once in the project list of topCalc. -
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 twoCalcinstances and returns a newCalcinstance 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 lengthinitVal- initial value- Returns:
- initialized int array
-