Class SemiJoinJoinTransposeRule

  • public class SemiJoinJoinTransposeRule
    extends RelOptRule
    Planner rule that pushes a SemiJoin down in a tree past a Join in order to trigger other rules that will convert SemiJoins.
    • SemiJoin(LogicalJoin(X, Y), Z) → LogicalJoin(SemiJoin(X, Z), Y)
    • SemiJoin(LogicalJoin(X, Y), Z) → LogicalJoin(X, SemiJoin(Y, Z))

    Whether this first or second conversion is applied depends on which operands actually participate in the semi-join.

    • Constructor Detail

      • SemiJoinJoinTransposeRule

        public SemiJoinJoinTransposeRule​(RelBuilderFactory relBuilderFactory)
        Creates a SemiJoinJoinTransposeRule.
    • Method Detail

      • setJoinAdjustments

        private void setJoinAdjustments​(int[] adjustments,
                                        int nFieldsX,
                                        int nFieldsY,
                                        int nFieldsZ,
                                        int adjustY,
                                        int adjustZ)
        Sets an array to reflect how much each index corresponding to a field needs to be adjusted. The array corresponds to fields in a 3-way join between (X, Y, and Z). X remains unchanged, but Y and Z need to be adjusted by some fixed amount as determined by the input.
        adjustments - array to be filled out
        nFieldsX - number of fields in X
        nFieldsY - number of fields in Y
        nFieldsZ - number of fields in Z
        adjustY - the amount to adjust Y by
        adjustZ - the amount to adjust Z by