apache/seatunnel · error · SeaTunnelRuntimeException
COMMON-19
COMMON-19
Error message
'${identifier}' unsupported convert SeaTunnel data type '${dataType}' of '${field}' to connector data type. What it means
PhoenixTypeConverter.reconvert() throws this when mapping a SeaTunnel column whose data type is a supported array type back to a Phoenix column type, but the array's ELEMENT type is unsupported (default branch of the inner switch). CommonError.convertToConnectorTypeError is invoked with PHOENIX and the element SQL type name.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/phoenix/PhoenixTypeConverter.java:364
break;
case BIGINT:
builder.columnType(PHOENIX_BIGINT + " " + PHOENIX_ARRAY);
builder.dataType(PHOENIX_BIGINT + " " + PHOENIX_ARRAY);
break;
case FLOAT:
builder.columnType(PHOENIX_FLOAT + " " + PHOENIX_ARRAY);
builder.dataType(PHOENIX_FLOAT + " " + PHOENIX_ARRAY);
break;
case DOUBLE:
builder.columnType(PHOENIX_DOUBLE + " " + PHOENIX_ARRAY);
builder.dataType(PHOENIX_DOUBLE + " " + PHOENIX_ARRAY);
break;
case STRING:
builder.columnType(PHOENIX_VARCHAR + " " + PHOENIX_ARRAY);
builder.dataType(PHOENIX_VARCHAR + " " + PHOENIX_ARRAY);
break;
default:
throw CommonError.convertToConnectorTypeError(
PHOENIX, elementType.getSqlType().name(), column.getName());
}
break;
default:
throw CommonError.convertToConnectorTypeError(
PHOENIX, column.getDataType().getSqlType().name(), column.getName());
}
return builder.build();
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Avoid auto-create of the array column, or pre-create the Phoenix table with a compatible array type
- Flatten or cast the array element to a supported type (e.g. ARRAY<STRING>) upstream via a transform
- Extend the inner switch in PhoenixTypeConverter.reconvert to map the element type
Example fix
// before: SeaTunnel ARRAY<MAP> column
// after: cast in source/transform so element type is STRING
source { Jdbc { query = "SELECT CAST(arr AS STRING) AS arr_str FROM t" } } Defensive patterns
Strategy: validation
Validate before calling
// Before auto-create, check array element types are supported:
for (CatalogColumn col : catalogTable.getTableSchema().getColumns()) {
if (col.getDataType() instanceof ArrayType) {
SqlType el = ((ArrayType) col.getDataType()).getElementType().getSqlType();
if (!Set.of(SqlType.STRING, SqlType.INT, SqlType.BIGINT, SqlType.DOUBLE, SqlType.BOOLEAN).contains(el)) {
throw new IllegalStateException("Unsupported Phoenix array element: " + el);
}
}
} Try / catch
try {
PhysicalColumn col = converter.reconvert(column);
} catch (SeaTunnelRuntimeException e) {
LOG.warn("Cannot map array element to Phoenix: {}", e.getMessage());
// cast element to STRING upstream or skip auto-create
} Prevention
- Only use arrays of primitive element types when sinking to Phoenix
- Pre-create Phoenix tables for complex schemas instead of auto-create-table
- Test schema conversion in a batch job before production runs
When it happens
Trigger: Auto-creating a Phoenix table (sink auto-create-table) where a SeaTunnel ARRAY column has an element type not in the inner switch (e.g. array of ROW, NULL, or other unhandled element types) — inner default in reconvert.
Common situations: Sink to Phoenix with auto-create enabled and a source produced ARRAY<DECIMAL> or ARRAY<MAP> style columns; Phoenix array support is limited, so many element types cannot be mapped.
Related errors
- COMMON-17
- COMMON-19
- COMMON-19
- The decimal column {} type decimal({},{}) is out of range, w
- The decimal column {} type decimal({},{}) is out of range, w
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/da201ad04dbe2b1e.
Report an issue: GitHub.