{"record":{"id":"40a135d1b1ff957f","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-40a135","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which is precision less than 0, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which is precision 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/xugu/XuguTypeConverter.java","lineNumber":262,"sourceCode":"                builder.columnType(XUGU_BIGINT);\n                builder.dataType(XUGU_BIGINT);\n                break;\n            case FLOAT:\n                builder.columnType(XUGU_FLOAT);\n                builder.dataType(XUGU_FLOAT);\n                break;\n            case DOUBLE:\n                builder.columnType(XUGU_DOUBLE);\n                builder.dataType(XUGU_DOUBLE);\n                break;\n            case DECIMAL:\n                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(),","sourceCodeStart":244,"sourceCodeEnd":280,"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#L244-L280","documentation":"XuguTypeConverter.reconvert maps a SeaTunnel DecimalType back to a Xugu decimal. Xugu does not support precision <= 0, so when the column's decimal precision is 0 or negative the converter logs this warning and substitutes the default precision/scale (decimal(default_precision, default_scale)).","triggerScenarios":"Catalog sink writes where a SeaTunnel DecimalType column carries precision 0 or a negative value (e.g. unbounded/default decimals from upstream mappers).","commonSituations":"Sources that emit DECIMAL without explicit precision (some connectors default precision to 0); programmatic pipeline construction passing DecimalType(0,0).","solutions":["Set an explicit positive precision on the DecimalType in the source/transform","Verify upstream type mapper produced a sane precision; fix the source mapping","Accept the default precision fallback if it is sufficient for your values"],"exampleFix":"// before\nDecimalType d = new DecimalType(0, 0); // triggers warning, becomes default\n// after\nDecimalType d = new DecimalType(38, 10);","handlingStrategy":"validation","validationCode":"// Validate decimal precision before sink conversion:\nDecimalType d = (DecimalType) column.getDataType();\nif (d.getPrecision() <= 0) {\n    throw new IllegalArgumentException(\"Column \" + column.getName() + \" needs explicit positive decimal precision\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always declare explicit precision/scale for decimal columns in sources","Review upstream mapper output for default/zero precisions","Set defaults at the transform layer rather than relying on converter fallbacks","Log resulting catalog schema after conversion in staging"],"tags":["jdbc","xugu","decimal","precision"],"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"}