Package io.trino.sql.routine.ir
Record Class IrVariable
java.lang.Object
java.lang.Record
io.trino.sql.routine.ir.IrVariable
- All Implemented Interfaces:
IrNode
public record IrVariable(int field, Type type, RowExpression defaultValue)
extends Record
implements IrNode
-
Constructor Summary
ConstructorsConstructorDescriptionIrVariable(int field, Type type, RowExpression defaultValue) Creates an instance of aIrVariablerecord class. -
Method Summary
Modifier and TypeMethodDescription<C,R> R accept(IrNodeVisitor<C, R> visitor, C context) Returns the value of thedefaultValuerecord component.final booleanIndicates whether some other object is "equal to" this one.intfield()Returns the value of thefieldrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
IrVariable
Creates an instance of aIrVariablerecord class.- Parameters:
field- the value for thefieldrecord componenttype- the value for thetyperecord componentdefaultValue- the value for thedefaultValuerecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
field
public int field()Returns the value of thefieldrecord component.- Returns:
- the value of the
fieldrecord component
-
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
defaultValue
Returns the value of thedefaultValuerecord component.- Returns:
- the value of the
defaultValuerecord component
-