Interface NestedBlockBuilder
-
- All Known Subinterfaces:
AggAddContext
,AggResetContext
,AggResultContext
,WinAggAddContext
,WinAggResetContext
,WinAggResultContext
- All Known Implementing Classes:
AggAddContextImpl
,AggResetContextImpl
,AggResultContextImpl
,NestedBlockBuilderImpl
,WinAggAddContextImpl
,WinAggResetContextImpl
,WinAggResultContextImpl
public interface NestedBlockBuilder
Allows to build nested code blocks with tracking of current context and the nullability of particularRexNode
expressions.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BlockBuilder
currentBlock()
Returns the current code blockjava.util.Map<RexNode,java.lang.Boolean>
currentNullables()
Returns the current nullability state of rex nodes.void
exitBlock()
Leaves the current code block.BlockBuilder
nestBlock()
Starts nested code block.void
nestBlock(BlockBuilder block)
Uses given block as the new code context.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.
-
-
-
Method Detail
-
nestBlock
BlockBuilder nestBlock()
Starts nested code block. The resulting block can optimize expressions and reuse already calculated values from the parent blocks.- Returns:
- new code block that can optimize expressions and reuse already calculated values from the parent blocks.
-
nestBlock
void nestBlock(BlockBuilder block)
Uses given block as the new code context. The current block will be restored afterexitBlock()
call.- Parameters:
block
- new code block- See Also:
exitBlock()
-
nestBlock
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 afterexitBlock()
call.- Parameters:
block
- new code blocknullables
- map of expression to its nullability state- See Also:
exitBlock()
-
currentBlock
BlockBuilder currentBlock()
Returns the current code block- Returns:
- current code block
-
currentNullables
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.- Returns:
- current nullability state of rex nodes
-
exitBlock
void exitBlock()
Leaves the current code block.- See Also:
nestBlock()
-
-