Class NestedBlockBuilderImpl

    • Field Detail

      • nullables

        private final java.util.List<java.util.Map<RexNode,​java.lang.Boolean>> nullables
    • Constructor Detail

      • NestedBlockBuilderImpl

        public NestedBlockBuilderImpl​(BlockBuilder block)
        Constructs nested block builders starting of a given code block.
        Parameters:
        block - root code block
    • Method Detail

      • nestBlock

        public final BlockBuilder nestBlock()
        Starts nested code block. The resulting block can optimize expressions and reuse already calculated values from the parent blocks.
        Specified by:
        nestBlock in interface NestedBlockBuilder
        Returns:
        new code block that can optimize expressions and reuse already calculated values from the parent blocks.
      • nestBlock

        public final void nestBlock​(BlockBuilder block,
                                    java.util.Map<RexNode,​java.lang.Boolean> nullables)
        Uses given block as the new code context and the map of nullability. The current block will be restored after exitBlock() call.
        Specified by:
        nestBlock in interface NestedBlockBuilder
        Parameters:
        block - new code block
        nullables - map of expression to its nullability state
        See Also:
        exitBlock()
      • currentNullables

        public final java.util.Map<RexNode,​java.lang.Boolean> currentNullables()
        Returns the current nullability state of rex nodes. The resulting value is the summary of all the maps in the block hierarchy.
        Specified by:
        currentNullables in interface NestedBlockBuilder
        Returns:
        current nullability state of rex nodes