Package com.darkcollective.relix.plan
Record Class PhysicalNode.LateralJoin
java.lang.Object
java.lang.Record
com.darkcollective.relix.plan.PhysicalNode.LateralJoin
- Record Components:
functionName- the TVF name, for display and debuggingarguments- the argumentOperandexpressions (may reference left columns); evaluated per left row at execution timebodyBuilder- given the per-row argument literals, returns the planned physical body for that invocationdeterministicBody- whether the function body evaluates to the same relation every time it is run — decided by the planner, which can see the body the executor only receives abodyBuilder()for. The executor may reuse one execution's rows across outer rows carrying the same arguments only when this istrue; the planned body itself is reusable either way, since planning does not evaluate anything
- All Implemented Interfaces:
PhysicalNode
- Enclosing interface:
PhysicalNode
public static record PhysicalNode.LateralJoin(Schema schema, String functionName, List<Operand> arguments, Function<List<Operand>,PhysicalNode> bodyBuilder, boolean deterministicBody, PhysicalNode left)
extends Record
implements PhysicalNode
Lateral / correlated table-valued function join: for each row of
left(),
evaluates the arguments() in that row's context, binds them into the
function body via bodyBuilder(), plans the instantiated body, and
concatenates the left row with each row the body produces.
The bodyBuilder() captures the function body, the planner, and the
schema-annotation map: given the argument expressions with parameter references
already replaced by their current literal values, it returns a ready-to-execute
PhysicalNode. This keeps all inlining and re-planning logic in the
planner rather than the executor.
Output schema = left schema ++ TVF return schema. Never pushed to a source.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.darkcollective.relix.plan.PhysicalNode
PhysicalNode.Aggregate, PhysicalNode.AsOfJoin, PhysicalNode.BernoulliSample, PhysicalNode.BuildSide, PhysicalNode.Closure, PhysicalNode.Cluster, PhysicalNode.ConstructiveCover, PhysicalNode.Cover, PhysicalNode.Distinct, PhysicalNode.Division, PhysicalNode.Downsample, PhysicalNode.Empty, PhysicalNode.Fixpoint, PhysicalNode.IntervalJoin, PhysicalNode.Iterate, PhysicalNode.Join, PhysicalNode.JoinAlgorithm, PhysicalNode.JoinKeys, PhysicalNode.JoinKind, PhysicalNode.LateralJoin, PhysicalNode.Limit, PhysicalNode.Optimize, PhysicalNode.Path, PhysicalNode.Pivot, PhysicalNode.Project, PhysicalNode.PushedScan, PhysicalNode.RecursiveRef, PhysicalNode.Rename, PhysicalNode.ReservoirSample, PhysicalNode.Scan, PhysicalNode.Select, PhysicalNode.Sessionize, PhysicalNode.SetKind, PhysicalNode.SetOp, PhysicalNode.Solve, PhysicalNode.Sort, PhysicalNode.Spool, PhysicalNode.TopK, PhysicalNode.Trace, PhysicalNode.Tree, PhysicalNode.Universal, PhysicalNode.Unnest, PhysicalNode.Unpivot, PhysicalNode.Why, PhysicalNode.Window -
Constructor Summary
ConstructorsConstructorDescriptionLateralJoin(Schema schema, String functionName, List<Operand> arguments, Function<List<Operand>, PhysicalNode> bodyBuilder, boolean deterministicBody, PhysicalNode left) Creates an instance of aLateralJoinrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theargumentsrecord component.Returns the value of thebodyBuilderrecord component.children()Direct child plans, left-to-right; empty for aPhysicalNode.Scan.booleanReturns the value of thedeterministicBodyrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefunctionNamerecord component.final inthashCode()Returns a hash code value for this object.left()Returns the value of theleftrecord component.schema()Returns the value of theschemarecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.darkcollective.relix.plan.PhysicalNode
deliveredOrdering, mapChildren
-
Constructor Details
-
LateralJoin
public LateralJoin(Schema schema, String functionName, List<Operand> arguments, Function<List<Operand>, PhysicalNode> bodyBuilder, boolean deterministicBody, PhysicalNode left) Creates an instance of aLateralJoinrecord class.- Parameters:
schema- the value for theschemarecord componentfunctionName- the value for thefunctionNamerecord componentarguments- the value for theargumentsrecord componentbodyBuilder- the value for thebodyBuilderrecord componentdeterministicBody- the value for thedeterministicBodyrecord componentleft- the value for theleftrecord component
-
-
Method Details
-
children
Description copied from interface:PhysicalNodeDirect child plans, left-to-right; empty for aPhysicalNode.Scan.- Specified by:
childrenin interfacePhysicalNode
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
schema
Returns the value of theschemarecord component.- Specified by:
schemain interfacePhysicalNode- Returns:
- the value of the
schemarecord component
-
functionName
Returns the value of thefunctionNamerecord component.- Returns:
- the value of the
functionNamerecord component
-
arguments
Returns the value of theargumentsrecord component.- Returns:
- the value of the
argumentsrecord component
-
bodyBuilder
Returns the value of thebodyBuilderrecord component.- Returns:
- the value of the
bodyBuilderrecord component
-
deterministicBody
public boolean deterministicBody()Returns the value of thedeterministicBodyrecord component.- Returns:
- the value of the
deterministicBodyrecord component
-
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-