{"record":{"id":"11e65139f4840523","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-11e651","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-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeConverter.java","lineNumber":360,"sourceCode":"                            decimalType.getScale(),\n                            MAX_PRECISION,\n                            precision,\n                            scale);\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 > MAX_SCALE) {\n                    scale = MAX_SCALE;\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                            MAX_SCALE,\n                            precision,\n                            scale);\n                }\n                builder.columnType(String.format(\"%s(%s,%s)\", ORACLE_NUMBER, precision, scale));\n                builder.dataType(ORACLE_NUMBER);\n                builder.precision(precision);\n                builder.scale(scale);\n                break;\n            case BYTES:\n                if (column.getColumnLength() == null || column.getColumnLength() <= 0) {\n                    builder.columnType(ORACLE_BLOB);","sourceCodeStart":342,"sourceCodeEnd":378,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/oracle/OracleTypeConverter.java#L342-L378","documentation":"Warning from OracleTypeConverter.reconvert: a decimal column's scale exceeds the Oracle dialect's MAX_SCALE, so it is clamped to MAX_SCALE and the resulting Oracle type is decimal(precision, MAX_SCALE). The log includes both original and adjusted decimal(p,s) so you can see exactly what will be created.","triggerScenarios":"reconvert (sink-side schema conversion for Oracle) on a Column with DecimalType whose scale > MAX_SCALE, e.g. sink auto-creating a table from a DECIMAL(30,20) upstream column.","commonSituations":"SeaTunnel sink to Oracle with auto table creation receiving high-scale decimals from DuckDB/Postgres/MySQL sources.","solutions":["Cast the column to a supported scale upstream: CAST(col AS DECIMAL(p, MAX_SCALE)).","Create the Oracle table yourself with the intended NUMBER(p,s) and disable/ignore auto creation.","If the extra fractional digits matter, store as VARCHAR or BINARY_DOUBLE in Oracle instead.","Verify data after sync to quantify the precision loss."],"exampleFix":"// before\nrate DecimalType(precision=30, scale=20)\n// after (upstream)\nrate = CAST(rate AS DECIMAL(30,12)); -- within Oracle MAX_SCALE","handlingStrategy":"validation","validationCode":"for (Column c : sinkColumns) {\n  if (c.getDataType() instanceof DecimalType\n      && ((DecimalType) c.getDataType()).getScale() > MAX_SCALE) {\n    // cast upstream: CAST(col AS DECIMAL(p, MAX_SCALE))\n  }\n}","typeGuard":"boolean isOracleSafeDecimal(DecimalType t) { return t.getScale() <= MAX_SCALE; }","tryCatchPattern":null,"preventionTips":["Pre-create Oracle tables with intended NUMBER(p,s) for high-scale data.","Cast oversized decimals in source SQL or a transform stage.","Quantify precision loss after sync; avoid silent clamping in production."],"tags":["jdbc","oracle","decimal","scale"],"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"}