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 is precision less than 0, it will be converted to decimal({},{}) What it means
Warning from YashanDbTypeConverter.reconvert when a DECIMAL column has precision <= 0, which YashanDB cannot represent. The converter substitutes DEFAULT_PRECISION/DEFAULT_SCALE and logs; no exception is raised.
Solutions
- Fix the source schema so the decimal has a valid precision (>= 1).
- Explicitly define the target YashanDB column as DECIMAL(p,s) with correct precision.
- Verify upstream connector metadata (JDBC driver precision reporting) is correct.
Example fix
// before: decimal(0,0) // after SQL: CAST(amount AS DECIMAL(38,10)) AS amount
Defensive patterns
Strategy: validation
Validate before calling
DecimalType d = (DecimalType) col.getDataType();
if (d.getPrecision() <= 0) {
col = col.copy().setDataType(new DecimalType(DEFAULT_PRECISION, DEFAULT_SCALE)).build();
} Type guard
boolean validPrecision(DecimalType d) { return d.getPrecision() > 0; } Prevention
- Validate source schemas for degenerate decimal(0,s) before writes
- Fix JDBC driver metadata issues rather than relying on clamps
- Declare target decimals explicitly in catalog DDL
When it happens
Trigger: Sink write to YashanDB where the incoming column is DecimalType with precision 0 or negative (typically from a broken or degenerate schema inference upstream).
Common situations: Schema inferred from bad metadata (some drivers return precision 0); hand-written catalog definitions with decimal(0,s); auto table creation from a corrupted source schema.
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…
- COMMON-17
- COMMON-19
- The column with type ARRAY will be converted to VECTOR in…
- The column with type will be converted to VECTOR in YashanDB
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/23e88a4fc43a132e.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbTypeConverter.java:358
builder.columnType(BIGINT);
builder.dataType(BIGINT);
break;
case FLOAT:
builder.columnType(FLOAT);
builder.dataType(FLOAT);
break;
case DOUBLE:
builder.columnType(DOUBLE);
builder.dataType(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)