{"record":{"id":"1f8899f7102cae16","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-1f8899","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum scale of {} supported by this Doris version, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which exceeds the maximum scale of (.+?) supported by this Doris version, 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":339,"sourceCode":"                            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(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            getMaxDecimalScale(),\n                            precision,\n                            getMaxDecimalScale());\n                    scale = getMaxDecimalScale();\n                }\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({},{})\",","sourceCodeStart":321,"sourceCodeEnd":357,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java#L321-L357","documentation":"sampleReconvert checks the decimal scale against getMaxDecimalScale(), the maximum scale the connected Doris version supports. If the column's scale exceeds it, the converter warns and clamps the scale to the version's maximum, converting the column to decimal(precision, maxSupportedScale).","triggerScenarios":"sampleReconvert reads a Doris decimal column whose getScale() > getMaxDecimalScale() for the target Doris version (older Doris versions support smaller max scales).","commonSituations":"Migrating schemas from newer Doris/other databases with large fractional scales (e.g. decimal(30,20)) into a Doris version with lower max scale; cross-version cluster upgrades.","solutions":["Alter the column to a scale supported by the target Doris version","Upgrade the Doris FE/BE to a version supporting larger decimal scales","Accept the clamped scale and be aware fractional precision beyond the clamp is lost/rounded"],"exampleFix":"// before: decimal(30,25) on a Doris with max scale 18\n// after\nALTER TABLE t MODIFY COLUMN c DECIMAL(30,18);","handlingStrategy":"validation","validationCode":"int maxScale = getMaxDecimalScale(); // depends on Doris version\nif (decimalType.getScale() > maxScale) {\n    // redeclare the column with scale <= maxScale\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Check the target Doris version's max decimal scale before migration","Align scale across source and Doris schemas during DDL design","Upgrade Doris if larger scales are business-critical"],"tags":["doris","decimal","scale","version-compat"],"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"}