{"record":{"id":"7d53206706bedf5f","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-7d5320","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/xugu/XuguTypeConverter.java","lineNumber":298,"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)\", XUGU_NUMERIC, precision, scale));\n                builder.dataType(XUGU_NUMERIC);\n                builder.precision(precision);\n                builder.scale(scale);\n                break;\n            case BYTES:\n                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {\n                    builder.columnType(XUGU_BLOB);","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java#L280-L316","documentation":"XuguTypeConverter.reconvert caps decimal scale at Xugu's MAX_SCALE. When the DecimalType scale exceeds the maximum, the converter clamps scale to MAX_SCALE and logs this warning; fractional digits beyond MAX_SCALE will be rounded or truncated on write.","triggerScenarios":"Writing DECIMAL columns with very high scale (e.g. DECIMAL(38,30)) from engines allowing larger scales than Xugu supports.","commonSituations":"Financial/scientific pipelines from PostgreSQL NUMERIC with large scale into Xugu; chained transforms that grow scale.","solutions":["Round/cast the column upstream to a scale within Xugu's MAX_SCALE","Accept the truncated scale if extra fractional digits are not significant","Transport as STRING if full fractional fidelity is required"],"exampleFix":"// before: DECIMAL(38,30) -> scale clamped to MAX_SCALE\n// after\nSELECT CAST(v AS DECIMAL(38,10)) AS v FROM t;","handlingStrategy":"validation","validationCode":"if (decimalType.getScale() > MAX_SCALE) {\n    log.warn(\"Column {} scale {} exceeds Xugu max {}; round upstream to avoid truncation\",\n        column.getName(), decimalType.getScale(), MAX_SCALE);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Round decimals to a supported scale in source queries or transforms","Confirm business tolerance for lost fractional digits","Document Xugu scale limits in pipeline design docs","Compare source/target scale in automated schema validation"],"tags":["jdbc","xugu","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-14T11:17:12.474Z"}