Class LambdaBuilder.Scope

java.lang.Object
io.substrait.expression.LambdaBuilder.Scope
Enclosing class:
LambdaBuilder

public class LambdaBuilder.Scope extends Object
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.