Package io.trino.metadata
Record Class RedirectionAwareTableHandle
java.lang.Object
java.lang.Record
io.trino.metadata.RedirectionAwareTableHandle
public record RedirectionAwareTableHandle(Optional<TableHandle> tableHandle, Optional<QualifiedObjectName> redirectedTableName)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionRedirectionAwareTableHandle(Optional<TableHandle> tableHandle, Optional<QualifiedObjectName> redirectedTableName) Creates an instance of aRedirectionAwareTableHandlerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static RedirectionAwareTableHandlenoRedirection(Optional<TableHandle> tableHandle) Returns the value of theredirectedTableNamerecord component.Returns the value of thetableHandlerecord component.final StringtoString()Returns a string representation of this record class.static RedirectionAwareTableHandlewithRedirectionTo(QualifiedObjectName redirectedTableName, TableHandle tableHandle)
-
Constructor Details
-
RedirectionAwareTableHandle
public RedirectionAwareTableHandle(Optional<TableHandle> tableHandle, Optional<QualifiedObjectName> redirectedTableName) Creates an instance of aRedirectionAwareTableHandlerecord class.- Parameters:
tableHandle- the value for thetableHandlerecord componentredirectedTableName- the value for theredirectedTableNamerecord component
-
-
Method Details
-
withRedirectionTo
public static RedirectionAwareTableHandle withRedirectionTo(QualifiedObjectName redirectedTableName, TableHandle tableHandle) -
noRedirection
-
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). -
tableHandle
Returns the value of thetableHandlerecord component.- Returns:
- the value of the
tableHandlerecord component
-
redirectedTableName
Returns the value of theredirectedTableNamerecord component.- Returns:
- the value of the
redirectedTableNamerecord component
-