Skip to content

Commit

Permalink
Remove the binary type constrain in
Browse files Browse the repository at this point in the history
  • Loading branch information
duanyyyyyyy committed Jan 23, 2025
1 parent 8216577 commit 20ce2b1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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<String> HIVE_UNSUPPORTED_TYPES = Arrays.asList("BINARY", "UNIONTYPE");
protected static final List<String> HIVE_UNSUPPORTED_TYPES = Arrays.asList("UNIONTYPE");

public static Type fromHiveType(String hiveType) {
String typeUpperCase = getTypeKeyword(hiveType).toUpperCase();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ public void testArrayString() {
itemType = ScalarType.createUnifiedDecimalType(4, 2);
Assert.assertEquals(new ArrayType(new ArrayType(itemType)),
fromHiveTypeToArrayType("array<Array<decimal(4, 2)>>"));

itemType = ScalarType.createType(PrimitiveType.VARBINARY);
Assert.assertEquals(new ArrayType(itemType),
fromHiveTypeToArrayType("array<BINARY>"));
}

@Test
Expand Down

0 comments on commit 20ce2b1

Please sign in to comment.