{"record":{"id":"f56352c0a8ca37a0","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-f56352","errorCode":null,"errorMessage":"The decimal column {} type decimal({},{}) is out of range, which exceeds the maximum scale of {}, it will be converted to decimal({},{})","messagePattern":"The decimal column (.+?) type decimal\\((.+?),(.+?)\\) is out of range, which exceeds the maximum scale of (.+?), 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":365,"sourceCode":"                            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({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            scale);\n                } else if (scale > precision) {\n                    scale = precision;\n                    log.warn(\n                            \"The decimal column {} type decimal({},{}) is out of range, \"\n                                    + \"which exceeds the maximum scale of {}, \"\n                                    + \"it will be converted to decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            precision,\n                            scale);\n                }\n\n                builder.columnType(String.format(\"%s(%s,%s)\", DORIS_DECIMALV3, precision, scale));\n                builder.dataType(DORIS_DECIMALV3);\n                builder.precision((long) precision);\n                builder.scale(scale);\n                break;\n            case TIME:\n                builder.length(8L);","sourceCodeStart":347,"sourceCodeEnd":383,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/datatype/AbstractDorisTypeConverter.java#L347-L383","documentation":"sampleReconvert finds a decimal column where scale > precision, which is invalid for Doris DECIMAL (scale must not exceed precision). The converter warns, clamps scale to precision, and converts the column to decimal(precision, precision).","triggerScenarios":"sampleReconvert processes a DecimalType with getScale() > getPrecision() while building the SeaTunnel schema from Doris table metadata.","commonSituations":"Schemas imported from systems that permit scale > precision (some allow it, meaning all digits are fractional); manual DDL mistakes like DECIMAL(5,10).","solutions":["Fix the DDL so scale <= precision, e.g. DECIMAL(10,5) instead of DECIMAL(5,10)","If all-fractional values are needed, widen precision to at least the desired scale","Accept the clamped decimal(p,p) fallback and validate that values still fit (integer digits are dropped)"],"exampleFix":"// before\nDECIMAL(5,10)\n// after\nDECIMAL(10,10);","handlingStrategy":"validation","validationCode":"if (decimalType.getScale() > decimalType.getPrecision()) {\n    // invalid: widen precision so scale <= precision\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Enforce scale <= precision in any schema generation code","Watch out for systems (e.g. some ANSI/Oracle modes) that allow scale > precision","Test schema conversion on a sample table before full sync"],"tags":["doris","decimal","scale","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"}