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 varchar(200) What it means
When converting schemas to StarRocks types, a decimal column whose precision exceeds StarRocks' maximum precision (38) cannot be represented. The connector logs this warning and degrades the column to varchar(200), which may truncate or break arithmetic semantics.
Solutions
- Reduce the source column precision to <= 38 (e.g. ALTER TABLE or cast in the source query)
- Add a transform to cast the column to a supported decimal(38,s) before the StarRocks sink
- Note the varchar(200) degradation: if values exceed 200 chars or need numeric semantics, redesign the mapping explicitly
Example fix
// before (source decimal(65,10) silently becomes varchar(200)) // after: cast in transform SqlTransform: cast(a as decimal(38,10)) as a
Defensive patterns
Strategy: validation
Validate before calling
if (dt instanceof DecimalType) {
DecimalType d = (DecimalType) dt;
if (d.getPrecision() > 38) throw new IllegalArgumentException(
"Column " + col.getName() + " decimal precision " + d.getPrecision() + " exceeds StarRocks max 38");
} Prevention
- Audit source schemas for precision > 38 decimals
- Add upstream casts to decimal(38,s) in the pipeline
- Remember varchar(200) fallback can truncate; never rely on it for numeric columns
When it happens
Trigger: reconvert() (via keyColumnType/valueColumnType) encounters a DecimalType with precision > MAX_PRECISION (38).
Common situations: Source databases with decimal(50,x) or huge-precision numeric columns (e.g. Oracle NUMBER with large precision); schema evolved upstream to bigger precision after job design.
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…
- The decimal column type decimal( , ) is out of range, which…
- The decimal column type decimal( , ) is out of range, which…
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/573ef217658423ec.
Report an issue: GitHub.
Appendix: source
Thrown at seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java:251
break;
}
DecimalType decimalType = (DecimalType) column.getDataType();
int precision = decimalType.getPrecision();
int scale = decimalType.getScale();
if (precision <= 0) {
precision = MAX_PRECISION.intValue();
scale = MAX_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) {
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(SR_VARCHAR);
builder.columnType(String.format("%s(%s)", SR_VARCHAR, 200));
break;
}
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)