{"record":{"id":"9cca98ed1e20ed82","repo":"apache/seatunnel","slug":"the-timestamp-column-type-timestamp-is-out-9cca98","errorCode":null,"errorMessage":"The timestamp column {} type timestamp({}) is out of range, which exceeds the maximum scale of {}, it will be converted to timestamp({})","messagePattern":"The timestamp column (.+?) type timestamp\\((.+?)\\) is out of range, which exceeds the maximum scale of (.+?), it will be converted to timestamp\\((.+?)\\)","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/xugu/XuguTypeConverter.java","lineNumber":371,"sourceCode":"                                column.getName(),\n                                column.getScale(),\n                                MAX_SCALE,\n                                timeScale);\n                    }\n                    builder.columnType(String.format(\"%s(%s)\", XUGU_TIME, timeScale));\n                    builder.scale(timeScale);\n                } else {\n                    builder.columnType(XUGU_TIME);\n                }\n                break;\n            case TIMESTAMP:\n                if (column.getScale() == null || column.getScale() <= 0) {\n                    builder.columnType(XUGU_TIMESTAMP);\n                } else {\n                    int timestampScale = column.getScale();\n                    if (column.getScale() > MAX_TIMESTAMP_SCALE) {\n                        timestampScale = MAX_TIMESTAMP_SCALE;\n                        log.warn(\n                                \"The timestamp column {} type timestamp({}) is out of range, \"\n                                        + \"which exceeds the maximum scale of {}, \"\n                                        + \"it will be converted to timestamp({})\",\n                                column.getName(),\n                                column.getScale(),\n                                MAX_TIMESTAMP_SCALE,\n                                timestampScale);\n                    }\n                    builder.columnType(String.format(\"TIMESTAMP(%s)\", timestampScale));\n                    builder.scale(timestampScale);\n                }\n                builder.dataType(XUGU_TIMESTAMP);\n                break;\n            case TIMESTAMP_TZ:\n                if (column.getScale() == null || column.getScale() <= 0) {\n                    builder.columnType(XUGU_TIMESTAMP_WITH_TIME_ZONE);\n                } else {\n                    int timestampTzScale = column.getScale();","sourceCodeStart":353,"sourceCodeEnd":389,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/xugu/XuguTypeConverter.java#L353-L389","documentation":"Warning from XuguTypeConverter.reconvert for TIMESTAMP columns whose scale exceeds XuGu's MAX_TIMESTAMP_SCALE. The converter lowers timestampScale to the maximum and logs instead of failing, so fractional-second digits beyond the maximum are lost.","triggerScenarios":"Writing a SeaTunnel TIMESTAMP column with scale > MAX_TIMESTAMP_SCALE into XuGu via catalog sink, e.g. timestamp(9) from a nanosecond-precision source.","commonSituations":"Replicating MySQL DATETIME(6)/TIMESTAMP(6) or PostgreSQL timestamptz(6) tables into XuGu; schema sync carrying higher precision than the target supports.","solutions":["Cap the source timestamp precision to XuGu's maximum (e.g. CAST(ts_col AS TIMESTAMP(3))).","Accept the clamp (warning only) and confirm downstream consumers tolerate truncated fractions.","Define the target XuGu column explicitly with an in-range scale."],"exampleFix":"// before: timestamp(9)\n// after\nSQL: CAST(ts_col AS TIMESTAMP(6)) AS ts_col","handlingStrategy":"validation","validationCode":"if (col.getSqlType() == SqlType.TIMESTAMP && col.getColumnScale() > MAX_TIMESTAMP_SCALE) {\n    col = col.copy().setColumnScale(MAX_TIMESTAMP_SCALE).build();\n}","typeGuard":"boolean withinTimestampScale(ColumnType c) { return c.getScale() == null || c.getScale() <= MAX_TIMESTAMP_SCALE; }","tryCatchPattern":null,"preventionTips":["Cap timestamp precision at the source (e.g. TIMESTAMP(3) or (6))","Compare source dialect max scale with XuGu's before table creation","Grep logs for 'is out of range' after catalog sync"],"tags":["jdbc","xugu","type-conversion","precision-loss"],"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"}