{"record":{"id":"440f96917062117b","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-440f96","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/dm/DmdbTypeConverter.java","lineNumber":370,"sourceCode":"                builder.columnType(DM_BIGINT);\n                builder.dataType(DM_BIGINT);\n                break;\n            case FLOAT:\n                builder.columnType(DM_REAL);\n                builder.dataType(DM_REAL);\n                break;\n            case DOUBLE:\n                builder.columnType(DM_DOUBLE);\n                builder.dataType(DM_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":352,"sourceCodeEnd":388,"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#L352-L388","documentation":"A log warning in DmdbTypeConverter.reconvert: a DecimalType column whose precision is <= 0 cannot be represented in Dameng DECIMAL. The converter substitutes DEFAULT_PRECISION/DEFAULT_SCALE and logs the original and converted values. The schema is silently corrected rather than failing.","triggerScenarios":"reconvert() called on a LogicalType DecimalType with precision <= 0 (e.g. decimal(0,s) or a decimal constructed from metadata lacking precision), typically during sink-to-catalog type re-conversion in applySchemaChange or DDL generation.","commonSituations":"Upstream sources/reporting decimal(0,...) or uninitialized precision; custom source connectors producing degenerate DecimalType; schema-translation paths that bypass validation.","solutions":["Fix the upstream SeaTunnel schema so the decimal precision is a positive value within Dameng limits","Explicitly define the column type (e.g. DECIMAL(38,10)) in the source/catalog config instead of relying on inferred precision","Accept the converted DEFAULT_PRECISION value if acceptable downstream","Validate column definitions with a catalog/dialect validation step before running the job"],"exampleFix":"// before\nSeaTunnelRowType with DECIMAL(0, 5)\n// after\nSeaTunnelRowType with DECIMAL(38, 5)","handlingStrategy":"validation","validationCode":"if (decimalType.getPrecision() <= 0) {\n    throw new IllegalArgumentException(\n        \"column \" + name + \" decimal precision must be > 0\");\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always specify explicit precision/scale for decimal columns in source schemas","Validate schemas before job submission","Avoid connectors or transforms that emit DecimalType without precision"],"tags":["jdbc","dameng","decimal","type-conversion"],"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"}