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 decimal({},{})

What it means

XuguTypeConverter.reconvert caps decimal precision at Xugu's MAX_PRECISION. When the SeaTunnel DecimalType precision exceeds it, the converter shrinks the precision to MAX_PRECISION and correspondingly reduces the scale by the overflow amount (clamped at 0), logging this warning. Low-order digits may be lost.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java:274

                DecimalType decimalType = (DecimalType) column.getDataType();
                long precision = decimalType.getPrecision();
                int scale = decimalType.getScale();
                if (precision <= 0) {
                    precision = DEFAULT_PRECISION;
                    scale = DEFAULT_SCALE;
                    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) {
                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));
                    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 decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_PRECISION,
                            precision,
                            scale);
                }
                if (scale < 0) {
                    scale = 0;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which is scale less than 0, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Reduce the column precision upstream to fit Xugu's MAX_PRECISION
  2. Accept the reduced precision/scale after verifying data fits the new range
  3. Cast to STRING for transport and re-cast on the Xugu side if full precision is essential

Example fix

// before: DECIMAL(50,20) -> converted to DECIMAL(MAX_PRECISION, scale-overflow)
// after
SELECT CAST(d AS DECIMAL(38,10)) AS d FROM t;
Defensive patterns

Strategy: validation

Validate before calling

// Pre-check precision against Xugu maximum:
if (decimalType.getPrecision() > MAX_PRECISION) {
    log.warn("Column {} precision {} exceeds Xugu max {}; pre-cast upstream",
        column.getName(), decimalType.getPrecision(), MAX_PRECISION);
}

Prevention

When it happens

Trigger: Writing columns with precision above Xugu's maximum (e.g. DECIMAL(50,20) mapped from Vertica/Postgres sources) via catalog-based sink.

Common situations: Pipelines from engines allowing precision > Xugu's max; joins/conversions that inflate precision beyond Xugu limits.

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