apache/seatunnel · warning

The decimal column {} type decimal({},{}) is out of range, w

Error message

The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum precision of {}, it will be converted to varchar(200)

What it means

sampleReconvert detects a decimal column whose precision exceeds Doris's MAX_PRECISION (38 by default). Since Doris cannot represent such a decimal, the converter warns and falls back to VARCHAR(200) for the column, which changes the read type to string.

Source

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

                    break;
                }
                DecimalType decimalType = (DecimalType) column.getDataType();
                int precision = decimalType.getPrecision();
                int scale = decimalType.getScale();
                if (precision <= 0) {
                    precision = MAX_PRECISION.intValue();
                    scale = Math.min(MAX_SCALE, getMaxDecimalScale());
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is precision less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (precision > MAX_PRECISION) {
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum precision of {}, "
                                    + "it will be converted to varchar(200)",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_PRECISION);
                    builder.dataType(DORIS_VARCHAR);
                    builder.columnType(String.format("%s(%s)", DORIS_VARCHAR, 200));
                    break;
                }

                if (scale > getMaxDecimalScale()) {
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum scale of {} supported by this "
                                    + "Doris version, it will be converted to decimal({},{})",
                            column.getName(),

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Reduce the column precision in Doris to <= 38 (e.g. ALTER TABLE ... DECIMAL(38,s))
  2. If keeping DECIMAL(p>38), accept the VARCHAR(200) fallback and cast/parse the value downstream in a transform
  3. Note VARCHAR(200) may truncate very long decimal literals; increase downstream handling accordingly

Example fix

// before: Doris column DECIMAL(50,10) -> read back as varchar(200)
// after
ALTER TABLE t MODIFY COLUMN c DECIMAL(38,10);
Defensive patterns

Strategy: validation

Validate before calling

if (decimalType.getPrecision() > 38) {
    // either shrink to DECIMAL(38,s) or plan a string-based downstream cast
}

Prevention

When it happens

Trigger: sampleReconvert encounters DecimalType with getPrecision() > MAX_PRECISION while converting a Doris table schema to SeaTunnel types.

Common situations: Tables created by other engines/tools with DECIMAL(p>38,s); metadata drift after Doris version changes; sink previously wrote an oversized decimal definition.

Understand the failure class

Background: "value must be between 0 and 1" / "out of range" / "must not be negative" errors: fixing range-validation failures across open-source libraries — this error's family across 42 libraries.

Related errors


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