apache/seatunnel · error · OpenMldbConnectorException

UNSUPPORTED_DATA_TYPE

UNSUPPORTED_DATA_TYPE

Error message

SeaTunnel does not support this data type

What it means

Thrown by OpenMldbSource.convertSeaTunnelDataType when a java.sql.Types column type from the OpenMldb schema has no mapping to a SeaTunnel data type. The switch over SQL type codes covers the common numeric/string/date/timestamp cases; any other code falls into the default branch and raises UNSUPPORTED_DATA_TYPE.

Source

Thrown at seatunnel-connectors-v2/connector-openmldb/src/main/java/org/apache/seatunnel/connectors/seatunnel/openmldb/source/OpenMldbSource.java:123

                return BasicType.BOOLEAN_TYPE;
            case Types.INTEGER:
                return BasicType.INT_TYPE;
            case Types.SMALLINT:
                return BasicType.SHORT_TYPE;
            case Types.BIGINT:
                return BasicType.LONG_TYPE;
            case Types.FLOAT:
                return BasicType.FLOAT_TYPE;
            case Types.DOUBLE:
                return BasicType.DOUBLE_TYPE;
            case Types.VARCHAR:
                return BasicType.STRING_TYPE;
            case Types.DATE:
                return LocalTimeType.LOCAL_DATE_TYPE;
            case Types.TIMESTAMP:
                return LocalTimeType.LOCAL_DATE_TIME_TYPE;
            default:
                throw new OpenMldbConnectorException(
                        CommonErrorCodeDeprecated.UNSUPPORTED_DATA_TYPE,
                        "SeaTunnel does not support this data type");
        }
    }

    private CatalogTable convert(List<Column> columnList) {
        TableSchema.Builder builder = TableSchema.builder();
        for (int i = 0; i < columnList.size(); i++) {
            Column column = columnList.get(i);
            builder.column(
                    PhysicalColumn.of(
                            column.getColumnName(),
                            convertSeaTunnelDataType(column.getSqlType()),
                            (Long) null,
                            column.isNotNull(),
                            null,
                            null));
        }

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Remove unsupported columns from the SQL so only mappable types (numeric, string, date, timestamp) are selected.
  2. CAST unsupported columns in the SQL to a supported type (e.g. CAST(col AS STRING)).
  3. Upgrade the connector to a version that maps the offending type.
  4. Add a case in convertSeaTunnelDataType mapping the type code to an appropriate SeaTunnel type if you maintain a fork.

Example fix

// before
SELECT id, features FROM db1.table1  -- features is ARRAY type
// after
SELECT id, CAST(features AS STRING) AS features FROM db1.table1
Defensive patterns

Strategy: validation

Validate before calling

// Inspect column types before running:
// for (Column c : inputSchema.getColumnList()) check c.getSqlType()
//   is one of the supported java.sql.Types used by convertSeaTunnelDataType
// Otherwise CAST unsupported columns to STRING in the SQL.

Try / catch

try {
    source.initialize(...);
} catch (OpenMldbConnectorException e) {
    if (String.valueOf(e).contains("does not support this data type")) {
        // rewrite SQL with CASTs for unsupported columns
    }
    throw e;
}

Prevention

When it happens

Trigger: Schema returned by getInputSchema contains a column whose java.sql.Types code is not handled by the switch (e.g. BINARY, ARRAY, exotic OpenMldb types), reached during CatalogTable conversion of every column.

Common situations: Selecting columns with unsupported OpenMldb types such as BLOB/binary or array/vector types, or a connector/driver version emitting new type codes the connector's mapping does not know.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/014e428f955d8a7e. Report an issue: GitHub.