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
XuguTypeConverter.reconvert caps decimal scale at Xugu's MAX_SCALE. When the DecimalType scale exceeds the maximum, the converter clamps scale to MAX_SCALE and logs this warning; fractional digits beyond MAX_SCALE will be rounded or truncated on write.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java:298
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)", XUGU_NUMERIC, precision, scale));
builder.dataType(XUGU_NUMERIC);
builder.precision(precision);
builder.scale(scale);
break;
case BYTES:
if (column.getColumnLength() == null || column.getColumnLength() <= 0) {
builder.columnType(XUGU_BLOB);View on GitHub (pinned to cf67b549a7)
Solutions
- Round/cast the column upstream to a scale within Xugu's MAX_SCALE
- Accept the truncated scale if extra fractional digits are not significant
- Transport as STRING if full fractional fidelity is required
Example fix
// before: DECIMAL(38,30) -> scale clamped to MAX_SCALE // after SELECT CAST(v AS DECIMAL(38,10)) AS v FROM t;
Defensive patterns
Strategy: validation
Validate before calling
if (decimalType.getScale() > MAX_SCALE) {
log.warn("Column {} scale {} exceeds Xugu max {}; round upstream to avoid truncation",
column.getName(), decimalType.getScale(), MAX_SCALE);
} Prevention
- Round decimals to a supported scale in source queries or transforms
- Confirm business tolerance for lost fractional digits
- Document Xugu scale limits in pipeline design docs
- Compare source/target scale in automated schema validation
When it happens
Trigger: Writing DECIMAL columns with very high scale (e.g. DECIMAL(38,30)) from engines allowing larger scales than Xugu supports.
Common situations: Financial/scientific pipelines from PostgreSQL NUMERIC with large scale into Xugu; chained transforms that grow scale.
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
- The decimal column {} type decimal({},{}) is out of range, w
- The decimal column {} type decimal({},{}) is out of range, w
- The decimal column {} type decimal({},{}) is out of range, w
- The decimal column {} type decimal({},{}) is out of range, w
- The decimal column {} type decimal({},{}) is out of range, w
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/7d53206706bedf5f.
Report an issue: GitHub.