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

The Doris type converter could not map a SeaTunnel data type back to a Doris column type when building the connector DDL/type for a sink. The SeaTunnel column's SQL type is not handled in sampleReconvertString's mapping, so the write schema cannot be expressed in Doris.

Solutions

  1. Change the SeaTunnel schema field type to one Doris supports (e.g. STRING instead of MAP)
  2. Use a transform (e.g. SQL/FieldMapper/Cast) to convert the field to a supported type before the Doris sink
  3. Simplify the column to Doris STRING type in the sink schema

Example fix

// before
SeaTunnelDataType<Map> t = DataTypes.MAP(DataTypes.STRING(), DataTypes.STRING());
// after
SeaTunnelDataType<String> t = DataTypes.STRING();
Defensive patterns

Strategy: validation

Validate before calling

SqlType t = column.getDataType().getSqlType(); if (!(t == SqlType.STRING || t == SqlType.INT || /* ...supported set */ false)) throw new IllegalStateException("SeaTunnel type " + t + " unsupported for Doris sink");

Prevention

When it happens

Trigger: sampleReconvertString receives a SeaTunnel Column whose dataType.getSqlType() is not one of the reconvert-supported types during sink schema conversion.

Common situations: Sink schema declared manually with types Doris cannot represent; upstream source produced a type (e.g. MAP/ARRAY variants) not supported for Doris DDL generation; mismatched catalog table definition.

Understand the failure class

Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.

Related errors


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

Appendix: source

Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java:244

        }

        if (column.getColumnLength() <= MAX_STRING_LENGTH) {
            builder.columnType(DORIS_STRING);
            builder.dataType(DORIS_STRING);
            return;
        }

        if (column.getColumnLength() > MAX_STRING_LENGTH) {
            log.warn(
                    String.format(
                            "The String type in Doris can only store up to 2GB bytes, and the current field [%s] length is [%s] bytes. If it is greater than the maximum length of the String in Doris, it may not be able to write data",
                            column.getName(), column.getColumnLength()));
            builder.columnType(DORIS_STRING);
            builder.dataType(DORIS_STRING);
            return;
        }

        throw CommonError.convertToConnectorTypeError(
                IDENTIFIER, column.getDataType().getSqlType().name(), column.getName());
    }

    /**
     * Maximum decimal scale accepted by the target Doris version.
     *
     * <p>DECIMALV3 only requires the scale to not exceed the precision, which the caller already
     * enforces, so the default imposes no further limit. Doris 1.x is stricter and overrides this.
     *
     * @return the largest scale that may be emitted for a decimal column
     */
    protected int getMaxDecimalScale() {
        return MAX_PRECISION.intValue();
    }

    protected BasicTypeDefine sampleReconvert(
            Column column, BasicTypeDefine.BasicTypeDefineBuilder builder) {

View on GitHub (pinned to cf67b549a7)