{"record":{"id":"1e210b7f94bbc116","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-1e210b","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum scale of {}, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which exceeds the maximum scale of (.+?), it will be converted to decimal\\((.+?),(.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java","lineNumber":277,"sourceCode":"                    builder.dataType(SR_VARCHAR);\n                    builder.columnType(String.format(\"%s(%s)\", SR_VARCHAR, 200));\n                    break;\n                }\n\n                if (scale < 0) {\n                    scale = 0;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which is scale less than 0, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            scale);\n                } else if (scale > precision) {\n                    scale = precision;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which exceeds the maximum scale of {}, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            precision,\n                            scale);\n                }\n                builder.columnType(String.format(\"%s(%s,%s)\", SR_DECIMAL, precision, scale));\n                builder.dataType(SR_DECIMAL);\n                builder.precision((long) precision);\n                builder.scale(scale);\n                break;\n            case TIME:\n                builder.length(8L);\n                builder.columnType(String.format(\"%s(%s)\", SR_VARCHAR, 8));","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-starrocks/src/main/java/org/apache/seatunnel/connectors/seatunnel/starrocks/datatypes/StarRocksTypeConverter.java#L259-L295","documentation":"WARN logged by StarRocksTypeConverter.reconvert when a DECIMAL column's scale exceeds the supported maximum; scale/precision are adjusted to fit and the converted decimal(precision,scale) is emitted. Type-adjustment warning only.","triggerScenarios":"reconvert() (via keyColumnType/valueColumnType) encounters a DecimalType where scale > precision (e.g. decimal(5,10)).","commonSituations":"Misconfigured schema definitions; upstream engines or metadata that permit scale > precision; schema drift where precision shrank but scale did not.","solutions":["Fix the source schema so scale <= precision","Insert a transform cast to a valid decimal(p,s) with s <= p","Accept the clamped type but verify fractional digits are not lost: with scale clamped to precision, integer digits become 0"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (dt instanceof DecimalType) {\n  DecimalType d = (DecimalType) dt;\n  if (d.getScale() > d.getPrecision()) throw new IllegalArgumentException(\n    \"Column \" + col.getName() + \" decimal scale \" + d.getScale() + \" exceeds precision \" + d.getPrecision());\n}","typeGuard":"boolean hasValidDecimalScale(Column c) {\n  if (!(c.getDataType() instanceof DecimalType)) return true;\n  DecimalType d = (DecimalType) c.getDataType();\n  return d.getScale() >= 0 && d.getScale() <= d.getPrecision();\n}","tryCatchPattern":null,"preventionTips":["Check scale <= precision in schema definitions during CI","Cast to a compliant decimal(p,s) via transform before the sink"],"tags":["decimal","scale","precision","type-conversion","starrocks"],"backgroundTag":"value-out-of-range","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}