{"record":{"id":"a5453affbf0eb161","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-a5453a","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-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowTypeConverter.java","lineNumber":327,"sourceCode":"                    return builder.build();\n                case TIME:\n                    int timeScale = Objects.isNull(scale) ? TimeType.DEFAULT_PRECISION : scale;\n                    TimeType timeType = DataTypes.TIME(timeScale);\n                    builder.nativeType(timeType.copy(column.isNullable()));\n                    builder.columnType(timeType.toString());\n                    builder.dataType(timeType.getTypeRoot().name());\n                    builder.scale(timeScale);\n                    builder.length(column.getColumnLength());\n                    return builder.build();\n                case DECIMAL:\n                    org.apache.seatunnel.api.table.type.DecimalType seatunnelDecimalType =\n                            (org.apache.seatunnel.api.table.type.DecimalType) dataType;\n                    int precision = seatunnelDecimalType.getPrecision();\n                    scale = seatunnelDecimalType.getScale();\n                    if (precision <= 0) {\n                        precision = DecimalType.DEFAULT_PRECISION;\n                        scale = DecimalType.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                                seatunnelDecimalType.getPrecision(),\n                                seatunnelDecimalType.getScale(),\n                                precision,\n                                scale);\n                    } else if (precision > DecimalType.MAX_PRECISION) {\n                        scale = (int) Math.max(0, scale - (precision - DecimalType.MAX_PRECISION));\n                        precision = DecimalType.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                                seatunnelDecimalType.getPrecision(),\n                                seatunnelDecimalType.getScale(),","sourceCodeStart":309,"sourceCodeEnd":345,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-paimon/src/main/java/org/apache/seatunnel/connectors/seatunnel/paimon/utils/RowTypeConverter.java#L309-L345","documentation":"RowTypeConverter.visit converts SeaTunnel DecimalType to Paimon DecimalType. A precision <= 0 is invalid; the converter replaces it with Paimon's DEFAULT_PRECISION/DEFAULT_SCALE and logs this warning so data still maps to a legal decimal column.","triggerScenarios":"A catalog table column carries DecimalType with precision 0 or negative (e.g. decimal(0,0) from upstream metadata) while RowTypeConverter builds the Paimon row type.","commonSituations":"JDBC/other source returning unnormalized decimal metadata; hand-written SeaTunnel schema with decimal(0,s); schema inference producing placeholder precision.","solutions":["Fix the upstream schema to declare decimal(p,s) with p >= 1.","Explicitly define the column type in your job schema (e.g. DECIMAL(20,4)) to bypass inference.","Accept the fallback decimal(10,0)-style defaults if precision was unknown, but verify values still fit.","Patch the source connector's type conversion if it routinely emits precision 0."],"exampleFix":"// before\nDecimalType(0, 0)\n// after\nDecimalType(10, 0)  // or real precision like (20,4)","handlingStrategy":"validation","validationCode":"if (decimalType.getPrecision() <= 0) decimalType = new DecimalType(10, 0); // fix before sink","typeGuard":"boolean isLegalDecimal(DecimalType t) { return t != null && t.getPrecision() > 0; }","tryCatchPattern":null,"preventionTips":["Declare explicit DECIMAL(p,s) in job schema","Fix source connectors emitting precision 0","Audit inferred schemas"],"tags":["paimon","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-23T08:17:48.524Z"}