{"record":{"id":"46b0af0716451ec3","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-46b0af","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-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeConverter.java","lineNumber":406,"sourceCode":"                            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,\n                            precision,\n                            scale);\n                }\n                builder.columnType(String.format(\"%s(%s,%s)\", DM_DECIMAL, precision, scale));\n                builder.dataType(DM_DECIMAL);\n                builder.precision(precision);\n                builder.scale(scale);\n                break;\n            case STRING:\n                builder.length(column.getColumnLength());\n                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {","sourceCodeStart":388,"sourceCodeEnd":424,"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#L388-L424","documentation":"A log warning in DmdbTypeConverter.reconvert: the decimal scale exceeds Dameng's MAX_SCALE. The converter clamps scale to MAX_SCALE, which truncates fractional digits capacity for the column definition.","triggerScenarios":"reconvert() on a DecimalType whose scale is greater than MAX_SCALE while precision is within range (e.g. DECIMAL(30,40) or DECIMAL(10,25) from a source allowing large scales).","commonSituations":"High-precision scientific/financial data from sources like MySQL DECIMAL(20,20) exceeding Dameng scale limits; silent rounding capacity loss in target schema.","solutions":["Adjust the upstream decimal to fit Dameng scale limits (reduce scale, raise precision if needed)","Pre-create the DM column with the desired type and exclude it from automatic type conversion","Use a transform to round values to the supported scale before writing","Review MAX_SCALE in DmdbTypeConverter and plan schema accordingly"],"exampleFix":"// before\nDECIMAL(20, 18)\n// after\nDECIMAL(20, 6) -- assuming MAX_SCALE = 6","handlingStrategy":"validation","validationCode":"if (decimalType.getScale() > MAX_SCALE) {\n    // round values or adjust schema before sync\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep decimal scale within the target DB's limits at design time","Add rounding transforms when precision must be reduced","Verify high-scale columns after sync to detect truncation"],"tags":["jdbc","dameng","decimal","scale-overflow"],"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-14T11:17:12.474Z"}