Package io.substrait.expression
Class LambdaBuilder.Scope
java.lang.Object
io.substrait.expression.LambdaBuilder.Scope
- Enclosing class:
- LambdaBuilder
A handle to a particular lambda's parameter scope. Use
ref(int) to create validated
parameter references.
Each Scope captures the depth of the lambdaContext stack at the time it was created. When
ref(int) is called, the Substrait stepsOut value is computed as the difference
between the current stack depth and the captured depth. This means the same Scope produces
different stepsOut values depending on the nesting level at the time of the call, which is what
allows outer.ref(0) to produce stepsOut=1 when called inside a nested lambda.
-
Method Summary
Modifier and TypeMethodDescriptionref(int paramIndex) Creates a validated reference to a parameter of this lambda.
-
Method Details
-
ref
Creates a validated reference to a parameter of this lambda.- Parameters:
paramIndex- index of the parameter within this lambda's parameter struct- Returns:
- a
FieldReferencepointing to the specified parameter - Throws:
IndexOutOfBoundsException- if paramIndex is out of bounds
-