{"record":{"id":"62aac91d435038e7","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-62aac9","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/xugu/XuguTypeConverter.java","lineNumber":274,"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":256,"sourceCodeEnd":292,"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#L256-L292","documentation":"XuguTypeConverter.reconvert caps decimal precision at Xugu's MAX_PRECISION. When the SeaTunnel DecimalType precision exceeds it, the converter shrinks the precision to MAX_PRECISION and correspondingly reduces the scale by the overflow amount (clamped at 0), logging this warning. Low-order digits may be lost.","triggerScenarios":"Writing columns with precision above Xugu's maximum (e.g. DECIMAL(50,20) mapped from Vertica/Postgres sources) via catalog-based sink.","commonSituations":"Pipelines from engines allowing precision > Xugu's max; joins/conversions that inflate precision beyond Xugu limits.","solutions":["Reduce the column precision upstream to fit Xugu's MAX_PRECISION","Accept the reduced precision/scale after verifying data fits the new range","Cast to STRING for transport and re-cast on the Xugu side if full precision is essential"],"exampleFix":"// before: DECIMAL(50,20) -> converted to DECIMAL(MAX_PRECISION, scale-overflow)\n// after\nSELECT CAST(d AS DECIMAL(38,10)) AS d FROM t;","handlingStrategy":"validation","validationCode":"// Pre-check precision against Xugu maximum:\nif (decimalType.getPrecision() > MAX_PRECISION) {\n    log.warn(\"Column {} precision {} exceeds Xugu max {}; pre-cast upstream\",\n        column.getName(), decimalType.getPrecision(), MAX_PRECISION);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Cast oversized decimals to DECIMAL(38,s) or lower in source queries","Know Xugu's precision/scale limits when designing cross-engine pipelines","Validate data magnitude fits the reduced precision","Automate schema diff checks between source and Xugu target"],"tags":["jdbc","xugu","decimal","precision","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"}