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
Logged by RedshiftTypeConverter.reconvert when a DECIMAL column has precision <= 0. Redshift requires positive precision, so the converter substitutes DEFAULT_PRECISION/DEFAULT_SCALE (typically 38/18) and warns.
Source
Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/redshift/RedshiftTypeConverter.java:237
builder.columnType(REDSHIFT_BIGINT);
builder.dataType(REDSHIFT_BIGINT);
break;
case FLOAT:
builder.columnType(REDSHIFT_REAL);
builder.dataType(REDSHIFT_REAL);
break;
case DOUBLE:
builder.columnType(REDSHIFT_DOUBLE_PRECISION);
builder.dataType(REDSHIFT_DOUBLE_PRECISION);
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
- Fix the source schema so the decimal has a valid precision >= 1
- Explicitly define the sink column with a concrete decimal(p,s)
- Review custom catalog/transform code generating decimal types
Example fix
// before: new DecimalType(0, 5) // after: new DecimalType(38, 5)
Defensive patterns
Strategy: validation
Validate before calling
if (decimalType.getPrecision() <= 0) { /* fix schema: use DecimalType(38, scale) */ } Prevention
- Validate programmatically built schemas before job submission
- Check metadata extraction code for zero/invalid precision
When it happens
Trigger: Sink column DECIMAL(p,s) with p <= 0 mapped through reconvert() for Redshift.
Common situations: Programmatic schema construction with uninitialized/wrong precision values, or metadata extraction returning 0 precision.
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
- COMMON-17
- COMMON-19
- 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
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/eb6403ba84daece6.
Report an issue: GitHub.