FANNG1 commented on code in PR #4265:
URL: https://github.com/apache/gravitino/pull/4265#discussion_r1691177027
##########
flink-connector/src/main/java/org/apache/gravitino/flink/connector/utils/TypeUtils.java:
##########
@@ -39,6 +47,69 @@ public static Type toGravitinoType(LogicalType logicalType) {
return Types.IntegerType.get();
case BIGINT:
return Types.LongType.get();
+ case CHAR:
+ CharType charType = (CharType) logicalType;
+ return Types.FixedCharType.of(charType.getLength());
+ case BOOLEAN:
+ return Types.BooleanType.get();
+ case BINARY:
+ case VARBINARY:
+ return Types.BinaryType.get();
+ case DECIMAL:
+ DecimalType decimalType = (DecimalType) logicalType;
+ return Types.DecimalType.of(decimalType.getPrecision(),
decimalType.getScale());
+ case TINYINT:
+ return Types.ByteType.get();
+ case SMALLINT:
+ return Types.ShortType.get();
+ case DATE:
+ return Types.DateType.get();
+ case TIME_WITHOUT_TIME_ZONE:
+ return Types.TimeType.get();
+ case TIMESTAMP_WITHOUT_TIME_ZONE:
+ return Types.TimestampType.withoutTimeZone();
+ case INTERVAL_YEAR_MONTH:
+ return Types.IntervalYearType.get();
+ case INTERVAL_DAY_TIME:
+ return Types.IntervalDayType.get();
+ case FLOAT:
+ return Types.FloatType.get();
+ case TIMESTAMP_WITH_LOCAL_TIME_ZONE:
+ case TIMESTAMP_WITH_TIME_ZONE:
+ return Types.TimestampType.withTimeZone();
+ case ARRAY:
+ ArrayType arrayType = (ArrayType) logicalType;
+ Type elementType = toGravitinoType(arrayType.getElementType());
+ return Types.ListType.of(elementType, arrayType.isNullable());
+ case MULTISET:
Review Comment:
could `MULTISET` transformed to `Map`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]