Package io.trino.sql.analyzer
Class RelationType
java.lang.Object
io.trino.sql.analyzer.RelationType
TODO: this needs to be merged with RowType at some point (when the type system is unified)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanResolve(QualifiedName name) intGets the count of all fields including hidden fields.Gets all fields including hidden fields.getFieldByIndex(int fieldIndex) Gets the field at the specified index.intGets only the visible fields.intGets the index of the specified field.joinWith(RelationType other) Creates a new tuple descriptor containing all fields from this tuple descriptor and all fields from the specified tuple descriptor.resolveFields(QualifiedName name) Gets the index of all columns matching the specified nameGets all visible fields whose relation alias matches given prefix.toString()Creates a new tuple descriptor with the relation, and, optionally, the columns aliased.Creates a new tuple descriptor containing only the visible fields.
-
Constructor Details
-
RelationType
-
RelationType
-
-
Method Details
-
indexOf
Gets the index of the specified field.- Throws:
IllegalArgumentException- when field is not found
-
getFieldByIndex
Gets the field at the specified index. -
getVisibleFields
Gets only the visible fields. No assumptions should be made about the order of the fields returned from this method. To obtain the index of a field, call indexOf. -
getVisibleFieldCount
public int getVisibleFieldCount() -
getAllFields
Gets all fields including hidden fields. No assumptions should be made about the order of the fields returned from this method. To obtain the index of a field, call indexOf. -
getAllFieldCount
public int getAllFieldCount()Gets the count of all fields including hidden fields. -
resolveVisibleFieldsWithRelationPrefix
Gets all visible fields whose relation alias matches given prefix. -
resolveFields
Gets the index of all columns matching the specified name -
canResolve
-
joinWith
Creates a new tuple descriptor containing all fields from this tuple descriptor and all fields from the specified tuple descriptor. -
withAlias
Creates a new tuple descriptor with the relation, and, optionally, the columns aliased. -
withOnlyVisibleFields
Creates a new tuple descriptor containing only the visible fields. -
toString
-