{"record":{"id":"cd43f530dbf103e9","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-cd43f5","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which is scale less than 0, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which is scale less than 0, it will be converted to decimal\\((.+?),(.+?)\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeConverter.java","lineNumber":395,"sourceCode":"                            precision,\n                            scale);\n                } else if (precision > MAX_PRECISION) {\n                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));\n                    precision = MAX_PRECISION;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which exceeds the maximum precision of {}, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            MAX_PRECISION,\n                            precision,\n                            scale);\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 > MAX_SCALE) {\n                    scale = MAX_SCALE;\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                            MAX_SCALE,","sourceCodeStart":377,"sourceCodeEnd":413,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeConverter.java#L377-L413","documentation":"A log warning in DmdbTypeConverter.reconvert: a DecimalType column with a negative scale cannot be represented in Dameng. The converter resets scale to 0 and logs the conversion. Precision-based clamping (3452/3453) runs first; this check catches any remaining negative scale.","triggerScenarios":"reconvert() on a DecimalType with scale < 0 (some systems allow negative scale, e.g. Oracle NUMBER(p,-s) semantics, or misconfigured DecimalType construction).","commonSituations":"Syncing from Oracle-style NUMBER columns with negative scale into Dameng; programmatically built DecimalType with invalid scale.","solutions":["Change the upstream schema to use scale >= 0","Round/wrap the value in a transform before the sink so scale is non-negative","Accept scale=0 conversion (values are effectively integers) if lossless scaling is not needed","Normalize column metadata at the source connector level before it reaches the sink"],"exampleFix":"// before\nDECIMAL(10, -2)\n// after\nDECIMAL(10, 0)","handlingStrategy":"validation","validationCode":"if (decimalType.getScale() < 0) {\n    throw new IllegalArgumentException(\"decimal scale must be >= 0\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Normalize NUMBER-style negative-scale columns upstream","Treat negative scale as a schema bug and fix at the source connector"],"tags":["jdbc","dameng","decimal","scale"],"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-14T05:17:10.506Z"}