{"record":{"id":"cb70d627fc66f7a7","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o","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-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java","lineNumber":315,"sourceCode":"            case DOUBLE:\n                builder.columnType(DORIS_DOUBLE);\n                builder.dataType(DORIS_DOUBLE);\n                break;\n            case DECIMAL:\n                // DORIS LARGEINT\n                if (column.getSourceType() != null\n                        && column.getSourceType().equalsIgnoreCase(DORIS_LARGEINT)) {\n                    builder.dataType(DORIS_LARGEINT);\n                    builder.columnType(DORIS_LARGEINT);\n                    break;\n                }\n                DecimalType decimalType = (DecimalType) column.getDataType();\n                int precision = decimalType.getPrecision();\n                int scale = decimalType.getScale();\n                if (precision <= 0) {\n                    precision = MAX_PRECISION.intValue();\n                    scale = Math.min(MAX_SCALE, getMaxDecimalScale());\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                    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 varchar(200)\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            MAX_PRECISION);\n                    builder.dataType(DORIS_VARCHAR);","sourceCodeStart":297,"sourceCodeEnd":333,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java#L297-L333","documentation":"When re-converting a Doris DECIMAL column back to a SeaTunnel type, sampleReconvert checks the decimal precision. If precision <= 0 the value is out of range for any Doris DECIMAL, so the converter warns and substitutes decimal(MAX_PRECISION, maxScale) for the column instead of failing.","triggerScenarios":"sampleReconvert encounters a DecimalType with getPrecision() <= 0 while building the read schema from a Doris table (e.g. schema introspection returned a degenerate decimal definition).","commonSituations":"Corrupted or non-standard decimal type metadata in Doris information schema; upstream tooling wrote decimal(0,x); manually crafted schema definitions with precision 0 or negative.","solutions":["Fix the table DDL in Doris to declare a valid precision (1-38)","Recreate the column with an explicit DECIMAL(p,s) where p > 0","Accept the fallback (converted to a max-precision decimal) if data semantics allow"],"exampleFix":"// before\nALTER TABLE t MODIFY COLUMN c DECIMAL(0,2);\n// after\nALTER TABLE t MODIFY COLUMN c DECIMAL(38,2);","handlingStrategy":"validation","validationCode":"DecimalType dt = (DecimalType) column.getDataType();\nif (dt.getPrecision() <= 0) {\n    // fix DDL: declare DECIMAL with precision between 1 and 38\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always declare explicit precision/scale in Doris DDL","Validate schema metadata coming from external migration tools","Never write decimal(0,s) definitions via programmatic schema generation"],"tags":["doris","decimal","type-conversion","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"}