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 {} supported by this Doris version, it will be converted to decimal({},{}) What it means
sampleReconvert checks the decimal scale against getMaxDecimalScale(), the maximum scale the connected Doris version supports. If the column's scale exceeds it, the converter warns and clamps the scale to the version's maximum, converting the column to decimal(precision, maxSupportedScale).
Source
Thrown at seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java:339
decimalType.getScale(),
precision,
scale);
} else if (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 varchar(200)",
column.getName(),
decimalType.getPrecision(),
decimalType.getScale(),
MAX_PRECISION);
builder.dataType(DORIS_VARCHAR);
builder.columnType(String.format("%s(%s)", DORIS_VARCHAR, 200));
break;
}
if (scale > getMaxDecimalScale()) {
log.warn(
"The decimal column {} type decimal({},{}) is out of range, "
+ "which exceeds the maximum scale of {} supported by this "
+ "Doris version, it will be converted to decimal({},{})",
column.getName(),
decimalType.getPrecision(),
decimalType.getScale(),
getMaxDecimalScale(),
precision,
getMaxDecimalScale());
scale = getMaxDecimalScale();
}
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({},{})",View on GitHub (pinned to cf67b549a7)
Solutions
- Alter the column to a scale supported by the target Doris version
- Upgrade the Doris FE/BE to a version supporting larger decimal scales
- Accept the clamped scale and be aware fractional precision beyond the clamp is lost/rounded
Example fix
// before: decimal(30,25) on a Doris with max scale 18 // after ALTER TABLE t MODIFY COLUMN c DECIMAL(30,18);
Defensive patterns
Strategy: validation
Validate before calling
int maxScale = getMaxDecimalScale(); // depends on Doris version
if (decimalType.getScale() > maxScale) {
// redeclare the column with scale <= maxScale
} Prevention
- Check the target Doris version's max decimal scale before migration
- Align scale across source and Doris schemas during DDL design
- Upgrade Doris if larger scales are business-critical
When it happens
Trigger: sampleReconvert reads a Doris decimal column whose getScale() > getMaxDecimalScale() for the target Doris version (older Doris versions support smaller max scales).
Common situations: Migrating schemas from newer Doris/other databases with large fractional scales (e.g. decimal(30,20)) into a Doris version with lower max scale; cross-version cluster upgrades.
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
- Invalid DECIMAL definition: {decimalTypeDefinition}
- 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/1f8899f7102cae16.
Report an issue: GitHub.