{"record":{"id":"b0b3e1003998684a","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-b0b3e1","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-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowTypeConverter.java","lineNumber":363,"sourceCode":"                                seatunnelDecimalType.getScale(),\n                                DecimalType.MAX_PRECISION,\n                                precision,\n                                scale);\n                    }\n                    if (scale < 0) {\n                        scale = DecimalType.DEFAULT_SCALE;\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                                seatunnelDecimalType.getPrecision(),\n                                seatunnelDecimalType.getScale(),\n                                precision,\n                                scale);\n                    } else if (scale > DecimalType.MAX_PRECISION) {\n                        scale = DecimalType.MAX_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                                seatunnelDecimalType.getPrecision(),\n                                seatunnelDecimalType.getScale(),\n                                DecimalType.MAX_PRECISION,\n                                precision,\n                                scale);\n                    }\n\n                    DecimalType paimonDecimalType = DataTypes.DECIMAL(precision, scale);\n                    builder.nativeType(paimonDecimalType.copy(column.isNullable()));\n                    builder.columnType(paimonDecimalType.toString());\n                    builder.dataType(paimonDecimalType.getTypeRoot().name());\n                    builder.scale(scale);\n                    builder.precision((long) precision);\n                    builder.length(column.getColumnLength());","sourceCodeStart":345,"sourceCodeEnd":381,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowTypeConverter.java#L345-L381","documentation":"RowTypeConverter decimal visit: when scale exceeds Paimon's allowed maximum (checked as > DecimalType.MAX_PRECISION here), the converter clamps scale to that maximum and warns that the decimal type was rewritten, possibly losing sub-scale digits.","triggerScenarios":"Column declared decimal(p,s) with s > 38 while RowTypeConverter converts the schema for Paimon.","commonSituations":"Precision-less sources that set scale extremely high (e.g. scale = Integer.MAX_VALUE placeholders); source engines allowing scale > precision; misconfigured schema templates.","solutions":["Declare an explicit decimal(p,s) with p,s within 1..38 in your job schema.","Round/truncate in a transform before the sink so lost digits are intentional.","Fix the source metadata mapping that emitted the oversized scale.","Accept the clamp only after verifying values never need digits beyond scale 38."],"exampleFix":"// before\nDECIMAL(38,50)\n// after\nDECIMAL(38,18)  // scale clamped to a legal value","handlingStrategy":"validation","validationCode":"if (decimalType.getScale() > 38) decimalType = new DecimalType(decimalType.getPrecision(), 38);","typeGuard":"boolean legalScale(DecimalType t) { return t.getScale() <= 38 && t.getScale() >= 0; }","tryCatchPattern":null,"preventionTips":["Bound scale at schema definition time","Reject placeholder scale values like Integer.MAX_VALUE","Round in transform before sink"],"tags":["paimon","decimal","type-conversion"],"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"}