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 is precision less than 0, it will be converted to decimal({},{})

What it means

When re-converting a Doris DECIMAL column back to a SeaTunnel type, sampleReconvert checks the decimal precision. If precision <= 0 the value is out of range for any Doris DECIMAL, so the converter warns and substitutes decimal(MAX_PRECISION, maxScale) for the column instead of failing.

Source

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

            case DOUBLE:
                builder.columnType(DORIS_DOUBLE);
                builder.dataType(DORIS_DOUBLE);
                break;
            case DECIMAL:
                // DORIS LARGEINT
                if (column.getSourceType() != null
                        && column.getSourceType().equalsIgnoreCase(DORIS_LARGEINT)) {
                    builder.dataType(DORIS_LARGEINT);
                    builder.columnType(DORIS_LARGEINT);
                    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);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Fix the table DDL in Doris to declare a valid precision (1-38)
  2. Recreate the column with an explicit DECIMAL(p,s) where p > 0
  3. Accept the fallback (converted to a max-precision decimal) if data semantics allow

Example fix

// before
ALTER TABLE t MODIFY COLUMN c DECIMAL(0,2);
// after
ALTER TABLE t MODIFY COLUMN c DECIMAL(38,2);
Defensive patterns

Strategy: validation

Validate before calling

DecimalType dt = (DecimalType) column.getDataType();
if (dt.getPrecision() <= 0) {
    // fix DDL: declare DECIMAL with precision between 1 and 38
}

Prevention

When it happens

Trigger: sampleReconvert encounters a DecimalType with getPrecision() <= 0 while building the read schema from a Doris table (e.g. schema introspection returned a degenerate decimal definition).

Common situations: Corrupted or non-standard decimal type metadata in Doris information schema; upstream tooling wrote decimal(0,x); manually crafted schema definitions with precision 0 or negative.

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/cb70d627fc66f7a7. Report an issue: GitHub.