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
XuguTypeConverter.reconvert maps a SeaTunnel DecimalType back to a Xugu decimal. Xugu does not support precision <= 0, so when the column's decimal precision is 0 or negative the converter logs this warning and substitutes the default precision/scale (decimal(default_precision, default_scale)).
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java:262
builder.columnType(XUGU_BIGINT);
builder.dataType(XUGU_BIGINT);
break;
case FLOAT:
builder.columnType(XUGU_FLOAT);
builder.dataType(XUGU_FLOAT);
break;
case DOUBLE:
builder.columnType(XUGU_DOUBLE);
builder.dataType(XUGU_DOUBLE);
break;
case DECIMAL:
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(),View on GitHub (pinned to cf67b549a7)
Solutions
- Set an explicit positive precision on the DecimalType in the source/transform
- Verify upstream type mapper produced a sane precision; fix the source mapping
- Accept the default precision fallback if it is sufficient for your values
Example fix
// before DecimalType d = new DecimalType(0, 0); // triggers warning, becomes default // after DecimalType d = new DecimalType(38, 10);
Defensive patterns
Strategy: validation
Validate before calling
// Validate decimal precision before sink conversion:
DecimalType d = (DecimalType) column.getDataType();
if (d.getPrecision() <= 0) {
throw new IllegalArgumentException("Column " + column.getName() + " needs explicit positive decimal precision");
} Prevention
- Always declare explicit precision/scale for decimal columns in sources
- Review upstream mapper output for default/zero precisions
- Set defaults at the transform layer rather than relying on converter fallbacks
- Log resulting catalog schema after conversion in staging
When it happens
Trigger: Catalog sink writes where a SeaTunnel DecimalType column carries precision 0 or a negative value (e.g. unbounded/default decimals from upstream mappers).
Common situations: Sources that emit DECIMAL without explicit precision (some connectors default precision to 0); programmatic pipeline construction passing DecimalType(0,0).
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
- DECIMAL precision {} exceeds maximum {}, truncating to {}
- 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/40a135d1b1ff957f.
Report an issue: GitHub.