Skip to content

Commit

Permalink
Remove HiveUtil isStructuralType for HiveType
Browse files Browse the repository at this point in the history
  • Loading branch information
dain committed Apr 21, 2023
1 parent bd1acfd commit 3705e8e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,7 @@ else if (type instanceof VarcharType || VARBINARY.equals(type)) {
else if (type instanceof CharType) {
parseStringColumn(column);
}
else if (isStructuralType(hiveTypes[column])) {
else if (isStructuralType(type)) {
parseObjectColumn(column);
}
else if (DATE.equals(type)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import io.trino.plugin.hive.metastore.Column;
import io.trino.plugin.hive.metastore.SortingColumn;
import io.trino.plugin.hive.metastore.Table;
import io.trino.plugin.hive.type.Category;
import io.trino.plugin.hive.type.StructTypeInfo;
import io.trino.spi.ErrorCodeSupplier;
import io.trino.spi.TrinoException;
Expand Down Expand Up @@ -696,11 +695,6 @@ public static boolean isStructuralType(Type type)
return (type instanceof ArrayType) || (type instanceof MapType) || (type instanceof RowType);
}

public static boolean isStructuralType(HiveType hiveType)
{
return hiveType.getCategory() == Category.LIST || hiveType.getCategory() == Category.MAP || hiveType.getCategory() == Category.STRUCT || hiveType.getCategory() == Category.UNION;
}

public static boolean booleanPartitionKey(String value, String name)
{
if (value.equalsIgnoreCase("true")) {
Expand Down

0 comments on commit 3705e8e

Please sign in to comment.