apache/seatunnel · warning
The decimal column type decimal( , ) is out of range, which…
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
Same RowTypeConverter decimal visit path: when requested precision exceeds Paimon's DecimalType.MAX_PRECISION (38), the converter clamps precision to 38 and shrinks scale by the overflow amount (min 0), warning that the column type was adjusted.
Solutions
- Cap the source column to decimal(38,s) in your job schema to make the conversion explicit.
- If values genuinely exceed 38 digits, serialize the column as STRING/bytes instead of decimal.
- Adjust the source connector metadata mapping to bound precision at 38.
- Accept the automatic clamp only if you confirmed no value uses the truncated digits.
Example fix
// before DECIMAL(50,10) // after DECIMAL(38,4) // or STRING if >38 digits of value are required
Defensive patterns
Strategy: validation
Validate before calling
if (decimalType.getPrecision() > 38) decimalType = new DecimalType(38, Math.max(0, decimalType.getScale() - (decimalType.getPrecision() - 38)));
Type guard
boolean fitsPaimonDecimal(DecimalType t) { return t.getPrecision() <= 38; } Prevention
- Cap precision at 38 at schema definition
- Use STRING for >38-digit values
- Verify source metadata precision bounds
When it happens
Trigger: Column declared decimal(p,s) with p > 38 (e.g. DECIMAL(50,10) from a big-number source) while converting the schema for Paimon.
Common situations: Sources like Oracle NUMBER or some CDC streams reporting huge precisions; metadata mapping defaults of 64-bit precision; copy-pasted DDL from systems supporting larger decimals.
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, which…
- The decimal column type decimal( , ) is out of range, which…
- The decimal column type decimal( , ) is out of range, which…
- Cannot convert field
- Cannot convert to BigDecimal:
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/28a7a1c389894872.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowTypeConverter.java:339
(org.apache.seatunnel.api.table.type.DecimalType) dataType;
int precision = seatunnelDecimalType.getPrecision();
scale = seatunnelDecimalType.getScale();
if (precision <= 0) {
precision = DecimalType.DEFAULT_PRECISION;
scale = DecimalType.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(),
seatunnelDecimalType.getPrecision(),
seatunnelDecimalType.getScale(),
precision,
scale);
} else if (precision > DecimalType.MAX_PRECISION) {
scale = (int) Math.max(0, scale - (precision - DecimalType.MAX_PRECISION));
precision = DecimalType.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(),
seatunnelDecimalType.getPrecision(),
seatunnelDecimalType.getScale(),
DecimalType.MAX_PRECISION,
precision,
scale);
}
if (scale < 0) {
scale = DecimalType.DEFAULT_SCALE;
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(),
seatunnelDecimalType.getPrecision(),View on GitHub (pinned to cf67b549a7)