{"record":{"id":"8af1ae511b18ade1","repo":"apache/seatunnel","slug":"the-time-column-type-time-is-out-of-range","errorCode":null,"errorMessage":"The time column {} type time({}) is out of range, which exceeds the maximum scale of {}, it will be converted to time({})","messagePattern":"The time column (.+?) type time\\((.+?)\\) is out of range, which exceeds the maximum scale of (.+?), it will be converted to time\\((.+?)\\)","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/dm/DmdbTypeConverter.java","lineNumber":460,"sourceCode":"                    builder.columnType(\n                            String.format(\"%s(%s)\", DM_VARBINARY, column.getColumnLength()));\n                    builder.dataType(DM_VARBINARY);\n                } else {\n                    builder.columnType(DM_LONGVARBINARY);\n                    builder.dataType(DM_LONGVARBINARY);\n                }\n                break;\n            case DATE:\n                builder.columnType(DM_DATE);\n                builder.dataType(DM_DATE);\n                break;\n            case TIME:\n                builder.dataType(DM_TIME);\n                if (column.getScale() != null && column.getScale() > 0) {\n                    Integer timeScale = column.getScale();\n                    if (timeScale > MAX_TIME_SCALE) {\n                        timeScale = MAX_TIME_SCALE;\n                        log.warn(\n                                \"The time column {} type time({}) is out of range, \"\n                                        + \"which exceeds the maximum scale of {}, \"\n                                        + \"it will be converted to time({})\",\n                                column.getName(),\n                                column.getScale(),\n                                MAX_SCALE,\n                                timeScale);\n                    }\n                    builder.columnType(String.format(\"%s(%s)\", DM_TIME, timeScale));\n                    builder.scale(timeScale);\n                } else {\n                    builder.columnType(DM_TIME);\n                }\n                break;\n            case TIMESTAMP:\n                builder.dataType(DM_TIMESTAMP);\n                if (column.getScale() != null && column.getScale() > 0) {\n                    Integer timestampScale = column.getScale();","sourceCodeStart":442,"sourceCodeEnd":478,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbTypeConverter.java#L442-L478","documentation":"A log warning in DmdbTypeConverter.reconvert for TIME columns: the fractional-second scale exceeds MAX_TIME_SCALE, so the converter clamps it to the maximum. The DM TIME column will have reduced sub-second precision. Note the log also prints MAX_SCALE in the 'maximum scale of {}' slot, which is a cosmetic inconsistency.","triggerScenarios":"reconvert() on a LocalTimeType/time column with scale != null && scale > 0 && scale > MAX_TIME_SCALE (e.g. TIME(9) from a source supporting nanosecond precision).","commonSituations":"Syncing time columns from sources with nanosecond precision (e.g. MySQL TIME(6), Postgres TIME(6)) into Dameng which supports fewer fractional digits; users noticing truncated precision.","solutions":["Reduce the source time column scale to Dameng's MAX_TIME_SCALE","Accept the clamped time(x) precision if sub-second truncation is acceptable","Pre-create the DM column with the needed precision and bypass automatic conversion","Round timestamps in a transform before the sink to match target precision"],"exampleFix":"// before\nTIME(9)\n// after\nTIME(3) -- clamped to MAX_TIME_SCALE","handlingStrategy":"validation","validationCode":"if (column.getScale() != null && column.getScale() > MAX_TIME_SCALE) {\n    // reduce source TIME precision before sync\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Match time fractional precision between source and Dameng in schema design","Treat nanosecond-precision time columns as lossy when targeting Dameng"],"tags":["jdbc","dameng","time","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"}