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 precision of {}, it will be converted to decimal({},{}) What it means
A log warning in DmdbTypeConverter.reconvert: the decimal precision exceeds Dameng's MAX_PRECISION. The converter clamps precision to MAX_PRECISION and reduces scale by the overflow amount (flooring at 0), possibly losing scale digits.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeConverter.java:382
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(),
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(),View on GitHub (pinned to cf67b549a7)
Solutions
- Reduce the upstream column precision to fit Dameng's MAX_PRECISION (e.g. DECIMAL(38,x))
- Pre-create the DM column with an acceptable type and disable automatic type conversion for it
- Verify the clamped scale is acceptable; if data loss is unacceptable, change the upstream type
- Increase awareness by checking the converter constants (MAX_PRECISION) before designing the schema
Example fix
// before (MySQL) DECIMAL(65,30) // after (Dameng-compatible) DECIMAL(38,10)
Defensive patterns
Strategy: validation
Validate before calling
if (decimalType.getPrecision() > MAX_PRECISION) {
// redesign column type before running the job
} Prevention
- Know Dameng's max decimal precision before modeling financial columns
- Downsize oversized decimals at the source rather than relying on silent clamping
- Check for unintended scale loss when clamping occurs
When it happens
Trigger: reconvert() on a DecimalType whose precision is greater than MAX_PRECISION (e.g. DECIMAL(65,30) coming from MySQL or another DB that supports larger decimals than Dameng).
Common situations: Cross-database sync from systems allowing precision > Dameng's maximum (e.g. MySQL DECIMAL(65,x)) into Dameng; wide financial columns losing scale after conversion.
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
- {} will probably cause value overflow.
- DATABASE_NOT_EXISTED
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/2be419c7ff5fbd05.
Report an issue: GitHub.