Class RelOptUtilTest


  • public class RelOptUtilTest
    extends java.lang.Object
    Unit test for RelOptUtil and other classes in this package.
    • Field Detail

      • relBuilder

        private org.apache.calcite.tools.RelBuilder relBuilder
      • empScan

        private org.apache.calcite.rel.RelNode empScan
      • deptScan

        private org.apache.calcite.rel.RelNode deptScan
      • empRow

        private org.apache.calcite.rel.type.RelDataType empRow
      • deptRow

        private org.apache.calcite.rel.type.RelDataType deptRow
      • empDeptJoinRelFields

        private java.util.List<org.apache.calcite.rel.type.RelDataTypeField> empDeptJoinRelFields
    • Constructor Detail

      • RelOptUtilTest

        public RelOptUtilTest()
    • Method Detail

      • config

        private static org.apache.calcite.tools.Frameworks.ConfigBuilder config()
        Creates a config based on the "scott" schema.
      • setUp

        public void setUp()
      • testTypeDump

        public void testTypeDump()
      • testRuleGuessDescription

        public void testRuleGuessDescription()
        Tests the rules for how we name rules.
      • testSplitJoinConditionEquals

        public void testSplitJoinConditionEquals()
        Test RelOptUtil.splitJoinCondition(RelNode, RelNode, RexNode, List, List, List) where the join condition contains just one which is a EQUAL operator.
      • testSplitJoinConditionIsNotDistinctFrom

        public void testSplitJoinConditionIsNotDistinctFrom()
        Test RelOptUtil.splitJoinCondition(RelNode, RelNode, RexNode, List, List, List) where the join condition contains just one which is a IS NOT DISTINCT operator.
      • testSplitJoinConditionExpandedIsNotDistinctFrom

        public void testSplitJoinConditionExpandedIsNotDistinctFrom()
        Test RelOptUtil.splitJoinCondition(RelNode, RelNode, RexNode, List, List, List) where the join condition contains an expanded version of IS NOT DISTINCT
      • testSplitJoinConditionExpandedIsNotDistinctFromUsingCase

        public void testSplitJoinConditionExpandedIsNotDistinctFromUsingCase()
        Test RelOptUtil.splitJoinCondition(RelNode, RelNode, RexNode, List, List, List) where the join condition contains an expanded version of IS NOT DISTINCT using CASE
      • testSplitJoinConditionExpandedIsNotDistinctFromUsingCase2

        public void testSplitJoinConditionExpandedIsNotDistinctFromUsingCase2()
        Test RelOptUtil.splitJoinCondition(RelNode, RelNode, RexNode, List, List, List) where the join condition contains an expanded version of IS NOT DISTINCT using CASE
      • splitJoinConditionHelper

        private void splitJoinConditionHelper​(org.apache.calcite.rex.RexNode joinCond,
                                              java.util.List<java.lang.Integer> expLeftKeys,
                                              java.util.List<java.lang.Integer> expRightKeys,
                                              java.util.List<java.lang.Boolean> expFilterNulls,
                                              org.apache.calcite.rex.RexNode expRemaining)
      • testPushDownJoinConditions

        public void testPushDownJoinConditions()
        Test RelOptUtil.pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder) where the join condition contains a complex expression
      • testPushDownJoinConditionsWithIsNotDistinct

        public void testPushDownJoinConditionsWithIsNotDistinct()
        Test RelOptUtil.pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder) where the join condition contains a complex expression
      • testPushDownJoinConditionsWithExpandedIsNotDistinct

        public void testPushDownJoinConditionsWithExpandedIsNotDistinct()
        Test RelOptUtil.pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder) where the join condition contains a complex expression
      • testPushDownJoinConditionsWithExpandedIsNotDistinctUsingCase

        public void testPushDownJoinConditionsWithExpandedIsNotDistinctUsingCase()
        Test RelOptUtil.pushDownJoinConditions(org.apache.calcite.rel.core.Join, RelBuilder) where the join condition contains a complex expression