{"record":{"id":"2be419c7ff5fbd05","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-2be419","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum precision of {}, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which exceeds the maximum precision 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":382,"sourceCode":"                DecimalType decimalType = (DecimalType) column.getDataType();\n                long precision = decimalType.getPrecision();\n                int scale = decimalType.getScale();\n                if (precision <= 0) {\n                    precision = DEFAULT_PRECISION;\n                    scale = DEFAULT_SCALE;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which is precision 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 (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(),","sourceCodeStart":364,"sourceCodeEnd":400,"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#L364-L400","documentation":"A log warning in DmdbTypeConverter.reconvert: the decimal precision exceeds Dameng's MAX_PRECISION. The converter clamps precision to MAX_PRECISION and reduces scale by the overflow amount (flooring at 0), possibly losing scale digits.","triggerScenarios":"reconvert() on a DecimalType whose precision is greater than MAX_PRECISION (e.g. DECIMAL(65,30) coming from MySQL or another DB that supports larger decimals than Dameng).","commonSituations":"Cross-database sync from systems allowing precision > Dameng's maximum (e.g. MySQL DECIMAL(65,x)) into Dameng; wide financial columns losing scale after conversion.","solutions":["Reduce the upstream column precision to fit Dameng's MAX_PRECISION (e.g. DECIMAL(38,x))","Pre-create the DM column with an acceptable type and disable automatic type conversion for it","Verify the clamped scale is acceptable; if data loss is unacceptable, change the upstream type","Increase awareness by checking the converter constants (MAX_PRECISION) before designing the schema"],"exampleFix":"// before (MySQL)\nDECIMAL(65,30)\n// after (Dameng-compatible)\nDECIMAL(38,10)","handlingStrategy":"validation","validationCode":"if (decimalType.getPrecision() > MAX_PRECISION) {\n    // redesign column type before running the job\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Know Dameng's max decimal precision before modeling financial columns","Downsize oversized decimals at the source rather than relying on silent clamping","Check for unintended scale loss when clamping occurs"],"tags":["jdbc","dameng","decimal","precision-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-14T05:17:10.506Z"}