Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class LateralJoinNode
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.LateralJoinNode
- Record Components:
left- the outer (driving) relation; must not be nullright- the relation evaluated per left row: aRelationFunctionCallor any relation expression; must not be nullkind- whether a left row with no right rows is dropped or kept; must not be nulllocation- source location of theLATERALkeyword
- All Implemented Interfaces:
RelNode
public record LateralJoinNode(RelNode left, RelNode right, LateralKind kind, SourceLocation location)
extends Record
implements RelNode
A lateral join: its right side is evaluated once per row of its left input, and may read
that row's columns.
Two forms are written. left LATERAL fn(arg, …) calls a table-valued function
whose arguments may name left columns; the right side is then a
RelationFunctionCall. left LATERAL (expression) evaluates a relation
expression in which a qualified name whose relation the expression does not read,
Customers.customer_id, is a column of the left row. Each left row is joined to the
rows its right side yields; OUTER also keeps, once, a left row
for which the right side yields none, its right columns NULL.
Both inputs are children: a traversal sees the function call or the expression as it sees any other input. What sets the right side apart is only that it may read the left row, so it is analysed and run in the left row's scope.
-
Constructor Summary
ConstructorsConstructorDescriptionLateralJoinNode(RelNode left, RelNode right) Convenience constructor for tests: an inner lateral; usesSourceLocation.UNKNOWN.LateralJoinNode(RelNode left, RelNode right, LateralKind kind, SourceLocation location) Creates an instance of aLateralJoinNoderecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(RelNodeVisitor<R> visitor) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanWhether the right side is a table-valued function call,L LATERAL fn(…), rather than a relation expression in parentheses.kind()Returns the value of thekindrecord component.left()Returns the value of theleftrecord component.location()Returns the value of thelocationrecord component.right()Returns the value of therightrecord 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.ast.RelNode
children, mapChildren, materializationMode, prettyPrint, prettyPrint
-
Constructor Details
-
LateralJoinNode
Creates an instance of aLateralJoinNoderecord class. -
LateralJoinNode
Convenience constructor for tests: an inner lateral; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
isFunctionCall
public boolean isFunctionCall()Whether the right side is a table-valued function call,L LATERAL fn(…), rather than a relation expression in parentheses.- Returns:
- true for the function form
-
accept
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
left
Returns the value of theleftrecord component.- Returns:
- the value of the
leftrecord component
-
right
Returns the value of therightrecord component.- Returns:
- the value of the
rightrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
location
Returns the value of thelocationrecord component.
-