Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
diqiu50 committed Oct 31, 2024
1 parent e6cd9f7 commit e0bfc3c
Showing 1 changed file with 2 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,8 @@ public class HiveDataTypeTransformer extends GeneralDataTypeTransformer {

@Override
public io.trino.spi.type.Type getTrinoType(Type type) {
boolean unsupportedType = false;
if (Type.Name.TIMESTAMP == type.name()) {
Types.TimestampType timestampType = (Types.TimestampType) type;
if (timestampType.hasTimeZone()) {
unsupportedType = true;
} else if (Type.Name.TIME == type.name()) {
unsupportedType = true;
}
}

if (unsupportedType) {
if ((Type.Name.TIMESTAMP == type.name() && ((Types.TimestampType) type).hasTimeZone())
|| Type.Name.TIME == type.name()) {
throw new TrinoException(
GravitinoErrorCode.GRAVITINO_UNSUPPORTED_GRAVITINO_DATATYPE,
"Unsupported gravitino datatype: " + type);
Expand Down

0 comments on commit e0bfc3c

Please sign in to comment.