apache/seatunnel · error · IllegalArgumentException
Unsupported Vitess catalog SQL type:
Error message
Unsupported Vitess catalog SQL type:
What it means
defaultTypeName converts a java.sql.Types (or Vitess catalog) SQL type integer back to a human-readable SQL type name when normalizing the bootstrap schema. If the sqlType value is not in the handled set, it throws this IllegalArgumentException. It indicates the schema contains a SQL type the Vitess connector's reverse mapping does not recognize.
Source
Thrown at seatunnel-connectors-v2/connector-cdc/connector-cdc-vitess/src/main/java/org/apache/seatunnel/connectors/seatunnel/cdc/vitess/source/split/VitessTableSchemaState.java:230
case BIGINT:
return "BIGINT";
case FLOAT:
return "FLOAT";
case DOUBLE:
return "DOUBLE";
case DECIMAL:
return "DECIMAL";
case BYTES:
return "BLOB";
case DATE:
return "DATE";
case TIME:
return "TIME";
case TIMESTAMP:
case TIMESTAMP_TZ:
return "TIMESTAMP";
default:
throw new IllegalArgumentException(
"Unsupported Vitess catalog SQL type: " + sqlType);
}
}
private static String normalizeTypeExpression(String sourceType) {
if (sourceType == null) {
return null;
}
String trimmed = sourceType.trim();
return trimmed.isEmpty() ? null : trimmed.toUpperCase(Locale.ROOT);
}
private static String baseTypeName(String typeExpression) {
int parenthesisIndex = typeExpression.indexOf('(');
if (parenthesisIndex < 0) {
return typeExpression;
}
return typeExpression.substring(0, parenthesisIndex).trim();View on GitHub (pinned to cf67b549a7)
Solutions
- Inspect the sqlType integer in the message and identify which column produces it, then alter the table to use a supported type
- Add the missing case to defaultTypeName returning the correct SQL type name string and rebuild
- Ensure resolveJdbcType and defaultTypeName switches stay in sync so forward and reverse mappings cover the same type set
Example fix
// before
case TIMESTAMP:
case TIMESTAMP_TZ:
return "TIMESTAMP";
default:
throw new IllegalArgumentException("Unsupported Vitess catalog SQL type: " + sqlType);
// after
case TIMESTAMP:
case TIMESTAMP_TZ:
return "TIMESTAMP";
case Types.BINARY:
return "BINARY";
default:
throw new IllegalArgumentException("Unsupported Vitess catalog SQL type: " + sqlType); Defensive patterns
Strategy: validation
Validate before calling
for (Column column : tableColumns) {
int sqlType = column.getDataType().getSqlType();
if (sqlType == Types.ARRAY || sqlType == Types.BINARY || sqlType == Types.OTHER) {
throw new IllegalArgumentException("sqlType " + sqlType + " of column " + column.getName() + " has no Vitess type-name mapping");
}
} Type guard
boolean hasTypeNameMapping(int sqlType) {
switch (sqlType) {
case Types.VARCHAR: case Types.CHAR: case Types.INTEGER:
case Types.BIGINT: case Types.DOUBLE: case Types.TIME:
case Types.TIMESTAMP: return true;
default: return false;
}
} Try / catch
try {
String typeName = normalizeColumn(column);
} catch (IllegalArgumentException e) {
if (e.getMessage().startsWith("Unsupported Vitess catalog SQL type")) {
logger.warn("Falling back to VARCHAR mapping for column {} ({})", column.getName(), e.getMessage());
return "VARCHAR";
}
throw e;
} Prevention
- Keep resolveJdbcType and defaultTypeName switches symmetric and tested against the full SqlType enum
- Filter out or explicitly map BLOB/BINARY/geometry columns before schema normalization
- Add a fallback mapping (Types.OTHER -> VARCHAR) in custom code paths instead of letting the default case throw
When it happens
Trigger: Calling typeName -> defaultTypeName during schema normalization when a column's resolved sqlType (e.g. Types.ARRAY, Types.BINARY, Types.OTHER) has no case in the switch, typically after a forward-mapping step produced or preserved an unhandled type constant.
Common situations: Tables with BLOB/BINARY/geometry columns whose JDBC types survive into normalization; a mismatch between the forward mapping (resolveJdbcType) and reverse mapping tables after partial type support was added.
Related errors
- Vitess CDC bootstrap schema does not support catalog SQL typ
- Unsupported alter table event:
- Unsupported alter table event:
- UNSUPPORTED_DATA_TYPE
- Unsupported type:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/c86e938c47a057ef.
Report an issue: GitHub.