{"record":{"id":"8b4b542e55686104","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-8b4b54","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum precision of {}, it will be converted to varchar(200)","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which exceeds the maximum precision of (.+?), it will be converted to varchar\\(200\\)","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":325,"sourceCode":"                    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);\n                    builder.columnType(String.format(\"%s(%s)\", DORIS_VARCHAR, 200));\n                    break;\n                }\n\n                if (scale > getMaxDecimalScale()) {\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which exceeds the maximum scale of {} supported by this \"\n                                    + \"Doris version, it will be converted to decimal({},{})\",\n                            column.getName(),","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java#L307-L343","documentation":"sampleReconvert detects a decimal column whose precision exceeds Doris's MAX_PRECISION (38 by default). Since Doris cannot represent such a decimal, the converter warns and falls back to VARCHAR(200) for the column, which changes the read type to string.","triggerScenarios":"sampleReconvert encounters DecimalType with getPrecision() > MAX_PRECISION while converting a Doris table schema to SeaTunnel types.","commonSituations":"Tables created by other engines/tools with DECIMAL(p>38,s); metadata drift after Doris version changes; sink previously wrote an oversized decimal definition.","solutions":["Reduce the column precision in Doris to <= 38 (e.g. ALTER TABLE ... DECIMAL(38,s))","If keeping DECIMAL(p>38), accept the VARCHAR(200) fallback and cast/parse the value downstream in a transform","Note VARCHAR(200) may truncate very long decimal literals; increase downstream handling accordingly"],"exampleFix":"// before: Doris column DECIMAL(50,10) -> read back as varchar(200)\n// after\nALTER TABLE t MODIFY COLUMN c DECIMAL(38,10);","handlingStrategy":"validation","validationCode":"if (decimalType.getPrecision() > 38) {\n    // either shrink to DECIMAL(38,s) or plan a string-based downstream cast\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep decimal precision <= 38 when creating Doris tables","Map oversized decimals to string columns deliberately at source configuration time","Review DDL imported from other databases for DECIMAL(p>38)"],"tags":["doris","decimal","precision","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-14T11:17:12.474Z"}