{"record":{"id":"e917aeea8b3e06a1","repo":"apache/seatunnel","slug":"the-timestamp-column-type-timestamp-is-out-e917ae","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/yashandb/YashanDbTypeConverter.java","lineNumber":482,"sourceCode":"                    builder.dataType(CLOB);\n                }\n                break;\n            case DATE:\n                builder.columnType(DATE);\n                builder.dataType(DATE);\n                break;\n            case TIME:\n                builder.columnType(TIME);\n                builder.dataType(TIME);\n                break;\n            case TIMESTAMP:\n                if (column.getScale() == null || column.getScale() <= 0) {\n                    builder.columnType(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(TIMESTAMP);\n                break;\n            case TIMESTAMP_TZ:\n                if (column.getScale() == null || column.getScale() <= 0) {\n                    builder.columnType(TIMESTAMP_WITH_TIME_ZONE);\n                } else {\n                    int tsScale = column.getScale();","sourceCodeStart":464,"sourceCodeEnd":500,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/yashandb/YashanDbTypeConverter.java#L464-L500","documentation":"A WARN log in YashanDbTypeConverter.reconvert() for TIMESTAMP columns. YashanDB has a maximum supported timestamp scale (MAX_TIMESTAMP_SCALE, fractional-second digits); if the requested column scale exceeds it, the converter clamps the scale to the maximum and logs that the value is out of range. No exception is thrown; data precision beyond the max scale is truncated.","triggerScenarios":"reconvert() processes a TIMESTAMP column whose scale (fractional second precision) is greater than MAX_TIMESTAMP_SCALE; the converter logs the warning and rewrites columnType to timestamp(maxScale).","commonSituations":"Source tables defined with timestamp(9) (nanoseconds, e.g. from MySQL/PostgreSQL) being sunk to YashanDB which supports fewer fractional digits; auto DDL generation from a SeaTunnel catalog schema.","solutions":["Accept the clamped timestamp scale if sub-max precision loss is acceptable","Reduce the source column scale to <= YashanDB's MAX_TIMESTAMP_SCALE in the schema","Pre-create the YashanDB table with the intended timestamp scale instead of relying on auto-conversion"],"exampleFix":"// before: SeaTunnel column TIMESTAMP with scale=9, YashanDB max scale=6\n// after: define column scale<=MAX_TIMESTAMP_SCALE or accept clamped timestamp(6)","handlingStrategy":"validation","validationCode":"// Validate timestamp scale against YashanDB limit before sinking\nint MAX_TIMESTAMP_SCALE = 6; // YashanDB limit per dialect\nif (column.getDataType().getSqlType() == SqlType.TIMESTAMP\n        && column.getScale() != null && column.getScale() > MAX_TIMESTAMP_SCALE) {\n    // clamp or alter schema before job run\n    ((TimestampType) column.getDataType()).setScale(MAX_TIMESTAMP_SCALE);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep timestamp fractional-second precision within the target dialect's max scale","Pre-create target tables with explicit supported scales","Review this WARN during schema validation/dry runs"],"tags":["jdbc","yashandb","timestamp","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"}