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 scale of {}, it will be converted to decimal({},{})

What it means

Warning from OracleTypeConverter.reconvert: a decimal column's scale exceeds the Oracle dialect's MAX_SCALE, so it is clamped to MAX_SCALE and the resulting Oracle type is decimal(precision, MAX_SCALE). The log includes both original and adjusted decimal(p,s) so you can see exactly what will be created.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeConverter.java:360

                            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(),
                            decimalType.getScale(),
                            precision,
                            scale);
                } else if (scale > MAX_SCALE) {
                    scale = MAX_SCALE;
                    log.warn(
                            "The decimal column {} type decimal({},{}) is out of range, "
                                    + "which exceeds the maximum scale of {}, "
                                    + "it will be converted to decimal({},{})",
                            column.getName(),
                            decimalType.getPrecision(),
                            decimalType.getScale(),
                            MAX_SCALE,
                            precision,
                            scale);
                }
                builder.columnType(String.format("%s(%s,%s)", ORACLE_NUMBER, precision, scale));
                builder.dataType(ORACLE_NUMBER);
                builder.precision(precision);
                builder.scale(scale);
                break;
            case BYTES:
                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
                    builder.columnType(ORACLE_BLOB);

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Cast the column to a supported scale upstream: CAST(col AS DECIMAL(p, MAX_SCALE)).
  2. Create the Oracle table yourself with the intended NUMBER(p,s) and disable/ignore auto creation.
  3. If the extra fractional digits matter, store as VARCHAR or BINARY_DOUBLE in Oracle instead.
  4. Verify data after sync to quantify the precision loss.

Example fix

// before
rate DecimalType(precision=30, scale=20)
// after (upstream)
rate = CAST(rate AS DECIMAL(30,12)); -- within Oracle MAX_SCALE
Defensive patterns

Strategy: validation

Validate before calling

for (Column c : sinkColumns) {
  if (c.getDataType() instanceof DecimalType
      && ((DecimalType) c.getDataType()).getScale() > MAX_SCALE) {
    // cast upstream: CAST(col AS DECIMAL(p, MAX_SCALE))
  }
}

Type guard

boolean isOracleSafeDecimal(DecimalType t) { return t.getScale() <= MAX_SCALE; }

Prevention

When it happens

Trigger: reconvert (sink-side schema conversion for Oracle) on a Column with DecimalType whose scale > MAX_SCALE, e.g. sink auto-creating a table from a DECIMAL(30,20) upstream column.

Common situations: SeaTunnel sink to Oracle with auto table creation receiving high-scale decimals from DuckDB/Postgres/MySQL sources.

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