{"record":{"id":"eb6403ba84daece6","repo":"apache/seatunnel","slug":"the-decimal-column-type-decimal-is-out-o-eb6403","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-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/redshift/RedshiftTypeConverter.java","lineNumber":237,"sourceCode":"                builder.columnType(REDSHIFT_BIGINT);\n                builder.dataType(REDSHIFT_BIGINT);\n                break;\n            case FLOAT:\n                builder.columnType(REDSHIFT_REAL);\n                builder.dataType(REDSHIFT_REAL);\n                break;\n            case DOUBLE:\n                builder.columnType(REDSHIFT_DOUBLE_PRECISION);\n                builder.dataType(REDSHIFT_DOUBLE_PRECISION);\n                break;\n            case DECIMAL:\n                DecimalType decimalType = (DecimalType) column.getDataType();\n                long precision = decimalType.getPrecision();\n                int scale = decimalType.getScale();\n                if (precision <= 0) {\n                    precision = DEFAULT_PRECISION;\n                    scale = 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                            decimalType.getPrecision(),\n                            decimalType.getScale(),\n                            precision,\n                            scale);\n                } else if (precision > MAX_PRECISION) {\n                    scale = (int) Math.max(0, scale - (precision - MAX_PRECISION));\n                    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 decimal({},{})\",\n                            column.getName(),\n                            decimalType.getPrecision(),\n                            decimalType.getScale(),","sourceCodeStart":219,"sourceCodeEnd":255,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/redshift/RedshiftTypeConverter.java#L219-L255","documentation":"Logged by RedshiftTypeConverter.reconvert when a DECIMAL column has precision <= 0. Redshift requires positive precision, so the converter substitutes DEFAULT_PRECISION/DEFAULT_SCALE (typically 38/18) and warns.","triggerScenarios":"Sink column DECIMAL(p,s) with p <= 0 mapped through reconvert() for Redshift.","commonSituations":"Programmatic schema construction with uninitialized/wrong precision values, or metadata extraction returning 0 precision.","solutions":["Fix the source schema so the decimal has a valid precision >= 1","Explicitly define the sink column with a concrete decimal(p,s)","Review custom catalog/transform code generating decimal types"],"exampleFix":"// before: new DecimalType(0, 5)\n// after: new DecimalType(38, 5)","handlingStrategy":"validation","validationCode":"if (decimalType.getPrecision() <= 0) { /* fix schema: use DecimalType(38, scale) */ }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate programmatically built schemas before job submission","Check metadata extraction code for zero/invalid precision"],"tags":["jdbc","redshift","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-14T05:17:10.506Z"}