Class NestedBlockBuilderImpl
java.lang.Object
org.apache.calcite.adapter.enumerable.NestedBlockBuilderImpl
- All Implemented Interfaces:
NestedBlockBuilder
- Direct Known Subclasses:
AggResetContextImpl
Allows to build nested code blocks with tracking of current context.
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs nested block builders starting of a given code block. -
Method Summary
Modifier and TypeMethodDescriptionfinal BlockBuilderReturns the current code block.final voidLeaves the current code block.final BlockBuilderStarts nested code block.final voidnestBlock(BlockBuilder block) Uses given block as the new code context.
-
Constructor Details
-
NestedBlockBuilderImpl
Constructs nested block builders starting of a given code block.- Parameters:
block- root code block
-
-
Method Details
-
nestBlock
Starts nested code block. The resulting block can optimize expressions and reuse already calculated values from the parent blocks.- Specified by:
nestBlockin interfaceNestedBlockBuilder- Returns:
- new code block that can optimize expressions and reuse already calculated values from the parent blocks.
-
nestBlock
Uses given block as the new code context. The current block will be restored afterexitBlock()call.- Specified by:
nestBlockin interfaceNestedBlockBuilder- Parameters:
block- new code block- See Also:
-
currentBlock
Returns the current code block.- Specified by:
currentBlockin interfaceNestedBlockBuilder
-
exitBlock
public final void exitBlock()Leaves the current code block.- Specified by:
exitBlockin interfaceNestedBlockBuilder- See Also:
-