use of io.trino.spi.type.TypeId in project trino by trinodb.
the class HiveBlockEncodingSerde method readType.
@Override
public Type readType(SliceInput sliceInput) {
requireNonNull(sliceInput, "sliceInput is null");
TypeId id = TypeId.of(readLengthPrefixedString(sliceInput));
for (Type type : TYPES) {
if (type.getTypeId().equals(id)) {
return type;
}
}
throw new IllegalArgumentException("Type not found: " + id);
}