diff --git a/fe/fe-core/src/main/java/com/starrocks/connector/ColumnTypeConverter.java b/fe/fe-core/src/main/java/com/starrocks/connector/ColumnTypeConverter.java index 0d448d4aa227c..1b78da0a9f48a 100644 --- a/fe/fe-core/src/main/java/com/starrocks/connector/ColumnTypeConverter.java +++ b/fe/fe-core/src/main/java/com/starrocks/connector/ColumnTypeConverter.java @@ -615,8 +615,12 @@ public static Type fromIcebergType(org.apache.iceberg.types.Type icebergType) { primitiveType = PrimitiveType.DATETIME; break; case STRING: +<<<<<<< HEAD case UUID: return ScalarType.createDefaultExternalTableString(); +======= + return ScalarType.createDefaultCatalogString(); +>>>>>>> 68a180a995 ([BugFix]uuid in iceberg should be binary (#54978)) case DECIMAL: int precision = ((Types.DecimalType) icebergType).precision(); int scale = ((Types.DecimalType) icebergType).scale(); @@ -649,6 +653,7 @@ public static Type fromIcebergType(org.apache.iceberg.types.Type icebergType) { } return new StructType(structFields); case BINARY: + case UUID: return Type.VARBINARY; case TIME: case FIXED: diff --git a/fe/fe-core/src/test/java/com/starrocks/connector/iceberg/IcebergApiConverterTest.java b/fe/fe-core/src/test/java/com/starrocks/connector/iceberg/IcebergApiConverterTest.java index 94727df1fe97f..338a22d5847b0 100644 --- a/fe/fe-core/src/test/java/com/starrocks/connector/iceberg/IcebergApiConverterTest.java +++ b/fe/fe-core/src/test/java/com/starrocks/connector/iceberg/IcebergApiConverterTest.java @@ -75,6 +75,13 @@ public void testString() { Assert.assertEquals(resType, stringType); } + @Test + public void testUUID() { + org.apache.iceberg.types.Type icebergType = Types.UUIDType.get(); + Type resType = fromIcebergType(icebergType); + Assert.assertTrue(resType.isBinaryType()); + } + @Test public void testArray() { Assert.assertEquals(fromIcebergType(Types.ListType.ofRequired(136, Types.IntegerType.get())),