From 20ce2b1c7e696f4a0fef623f31867f0e98fade18 Mon Sep 17 00:00:00 2001 From: duanyyyyyyy Date: Thu, 23 Jan 2025 18:12:36 +0800 Subject: [PATCH] Remove the binary type constrain in --- .../java/com/starrocks/connector/ColumnTypeConverter.java | 2 +- .../java/com/starrocks/connector/ColumnTypeConverterTest.java | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 f8a6d7726301d..43391be6f3bbd 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 @@ -102,7 +102,7 @@ public class ColumnTypeConverter { public static final String STRUCT_PATTERN = "^struct<" + COMPLEX_PATTERN + ">"; public static final String CHAR_PATTERN = "^char\\(([0-9]+)\\)"; public static final String VARCHAR_PATTERN = "^varchar\\(([0-9,-1]+)\\)"; - protected static final List HIVE_UNSUPPORTED_TYPES = Arrays.asList("BINARY", "UNIONTYPE"); + protected static final List HIVE_UNSUPPORTED_TYPES = Arrays.asList("UNIONTYPE"); public static Type fromHiveType(String hiveType) { String typeUpperCase = getTypeKeyword(hiveType).toUpperCase(); diff --git a/fe/fe-core/src/test/java/com/starrocks/connector/ColumnTypeConverterTest.java b/fe/fe-core/src/test/java/com/starrocks/connector/ColumnTypeConverterTest.java index 1aeb5646dcdf5..6580a65b629bb 100644 --- a/fe/fe-core/src/test/java/com/starrocks/connector/ColumnTypeConverterTest.java +++ b/fe/fe-core/src/test/java/com/starrocks/connector/ColumnTypeConverterTest.java @@ -135,6 +135,10 @@ public void testArrayString() { itemType = ScalarType.createUnifiedDecimalType(4, 2); Assert.assertEquals(new ArrayType(new ArrayType(itemType)), fromHiveTypeToArrayType("array>")); + + itemType = ScalarType.createType(PrimitiveType.VARBINARY); + Assert.assertEquals(new ArrayType(itemType), + fromHiveTypeToArrayType("array")); } @Test