apache/seatunnel · error · UnsupportedOperationException
Unsupported type conversion from %s to Hive ORC type
Error message
Unsupported type conversion from %s to Hive ORC type
What it means
Default branch of seatunnelToHiveType's switch: any SeaTunnel SqlType without an explicit Hive (ORC) mapping hits this and throws UnsupportedOperationException formatted with the offending SqlType. It signals the Hive ORC writer cannot represent that type.
Source
Thrown at seatunnel-connectors-v2/connector-hive/src/main/java/org/apache/seatunnel/connectors/seatunnel/hive/utils/HiveTypeConvertor.java:156
org.apache.seatunnel.api.table.type.SeaTunnelDataType<?> keyType =
mapType.getKeyType();
org.apache.seatunnel.api.table.type.SeaTunnelDataType<?> valueType =
mapType.getValueType();
if (keyType == null || valueType == null) {
throw new UnsupportedOperationException(
"MAP type requires key and value types");
}
return "map<"
+ seatunnelToHiveType(keyType)
+ ","
+ seatunnelToHiveType(valueType)
+ ">";
}
throw new UnsupportedOperationException("MAP type requires key and value types");
case NULL:
throw new UnsupportedOperationException("Orc does not support NULL type");
default:
throw new UnsupportedOperationException(
String.format(
"Unsupported type conversion from %s to Hive ORC type",
seaTunnelType.getSqlType()));
}
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Change the offending column to a supported type (primitives, STRING, struct, array, map).
- Add a mapping case for the SqlType in HiveTypeConvertor.seatunnelToHiveType if the equivalent Hive type exists.
- Use a transform to cast the field to a supported type before the Hive sink.
Example fix
// before
// switch has no case for SqlType.ROW_WITH_METADATA
// after
case ROW_WITH_METADATA:
return seatunnelToHiveType(...); // or map to an existing supported type Defensive patterns
Strategy: validation
Validate before calling
static final Set<SqlType> HIVE_SUPPORTED = Set.of(
SqlType.STRING, SqlType.BOOLEAN, SqlType.TINYINT, SqlType.SMALLINT,
SqlType.INT, SqlType.BIGINT, SqlType.FLOAT, SqlType.DOUBLE,
SqlType.DATE, SqlType.TIMESTAMP, SqlType.ROW, SqlType.ARRAY, SqlType.MAP);
if (!HIVE_SUPPORTED.contains(type.getSqlType())) {
throw new IllegalArgumentException("Type not supported by Hive converter: " + type.getSqlType());
} Try / catch
try {
String hiveType = HiveTypeConvertor.seatunnelToHiveType(type);
} catch (UnsupportedOperationException e) {
if (e.getMessage().startsWith("Unsupported type conversion")) {
// log type.getSqlType() and cast/drop the field in a transform
}
throw e;
} Prevention
- Keep sink schemas limited to types the Hive converter maps.
- Insert a SeaTunnel transform to cast exotic types before the Hive sink.
- After upgrading SeaTunnel, diff new SqlTypes against the Hive converter's switch.
When it happens
Trigger: Calling seatunnelToHiveType with an unmapped SqlType (e.g. complex or newer types not covered by the switch cases) — the message's %s is filled with seaTunnelType.getSqlType().
Common situations: Introducing a column with a recently added SqlType into a Hive sink schema; upgrading SeaTunnel and using a new type before the Hive type converter gained a mapping.
Related errors
- Orc does not support NULL type
- COMMON-17
- UNSUPPORTED_DATA_TYPE
- UNSUPPORTED_DATA_TYPE
- UNSUPPORTED_DATA_TYPE
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/1e12d8f708c9e426.
Report an issue: GitHub.