Module com.darkcollective.relix.ast
Package com.darkcollective.relix.ast
Record Class RelationFunctionCall
java.lang.Object
java.lang.Record
com.darkcollective.relix.ast.RelationFunctionCall
- Record Components:
functionName- the name of the table-valued function; must not be blankarguments- the scalar argument expressions, in order; must not be nulllocation- the source location of this node; never null
- All Implemented Interfaces:
RelNode
public record RelationFunctionCall(String functionName, List<Operand> arguments, SourceLocation location)
extends Record
implements RelNode
A reference to a table-valued (relation-returning) user-defined function, used
wherever a relation is expected — a leaf node in the relational algebra tree.
Example: recentOrders(2) invokes the table-valued function
recentOrders with the scalar argument 2; it yields the relation
produced by the function's body with that argument bound to its parameter.
The arguments are scalar Operand expressions
(not relational children), so this node has no RelNode children and is
treated as a leaf by RelNode.children()/RelNode.mapChildren(java.util.function.UnaryOperator<com.darkcollective.relix.ast.RelNode>). Binding is by
substitution: the planner inlines the function's body with each parameter
replaced by the corresponding argument expression.
-
Constructor Summary
ConstructorsConstructorDescriptionRelationFunctionCall(String functionName, List<Operand> arguments) Convenience constructor for tests; usesSourceLocation.UNKNOWN.RelationFunctionCall(String functionName, List<Operand> arguments, SourceLocation location) Creates an instance of aRelationFunctionCallrecord class. -
Method Summary
Modifier and TypeMethodDescription<R> Raccept(RelNodeVisitor<R> visitor) Returns the value of theargumentsrecord 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.location()Returns the value of thelocationrecord 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
-
Constructor Details
-
RelationFunctionCall
Creates an instance of aRelationFunctionCallrecord class.- Parameters:
functionName- the value for thefunctionNamerecord componentarguments- the value for theargumentsrecord componentlocation- the value for thelocationrecord component
-
RelationFunctionCall
Convenience constructor for tests; usesSourceLocation.UNKNOWN.
-
-
Method Details
-
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). -
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
-
location
Returns the value of thelocationrecord component.
-