{"record":{"id":"b24aa2c0b334b929","repo":"apache/seatunnel","slug":"skipping-unsupported-default-value-for-column-i-b24aa2","errorCode":null,"errorMessage":"Skipping unsupported default value for column {} in table {}.","messagePattern":"Skipping unsupported default value for column (.+?) in table (.+?)\\.","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/DmdbDialect.java","lineNumber":335,"sourceCode":"\n        // Handle null constraints\n        // DamengDB does not direct support modifying the NULL to NOT-NUll constraint directly.\n        // if supported, need update null value to defaultvalue, then modify the column to NOT NULL.\n        // this is a high-risk operation, so we do not support it.\n        boolean targetColumnNullable = columnIsNullable(connection, tablePath, column.getName());\n        if (column.isNullable() != targetColumnNullable && !targetColumnNullable) {\n            sqlBuilder.append(\" NULL \");\n        }\n\n        // Handle default value\n        if (column.getDefaultValue() != null) {\n            if (sameCatalog\n                    || !isSpecialDefaultValue(typeDefine.getDefaultValue(), sourceDialectName)) {\n                String defaultValueClause =\n                        sqlClauseWithDefaultValue(typeDefine, sourceDialectName);\n                sqlBuilder.append(\" \").append(defaultValueClause);\n            } else {\n                log.warn(\n                        \"Skipping unsupported default value for column {} in table {}.\",\n                        column.getName(),\n                        tablePath.getFullName());\n            }\n        }\n        List<String> ddlSQL = new ArrayList<>();\n        ddlSQL.add(sqlBuilder.toString());\n        // Process column comment\n        if (column.getComment() != null) {\n            ddlSQL.add(buildColumnCommentSQL(tablePath, column));\n        }\n        // Execute the DDL statement\n        executeDDL(connection, ddlSQL);\n    }\n\n    @Override\n    public boolean needsQuotesWithDefaultValue(BasicTypeDefine columnDefine) {\n        String dmDataType = columnDefine.getDataType();","sourceCodeStart":317,"sourceCodeEnd":353,"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/DmdbDialect.java#L317-L353","documentation":"This is a log warning emitted while building ALTER TABLE DDL in the Dameng dialect's applySchemaChange. When the sink is not the same catalog and the column's default value is a 'special' default (dialect-specific expression unsupported by Dameng, e.g. CURRENT_TIMESTAMP from another dialect), the dialect omits the DEFAULT clause and only logs. The column will be created/altered without the default value.","triggerScenarios":"applySchemaChange on a cross-dialect sync (e.g. MySQL->Dameng) where a column carries a source-dialect default value that isSpecialDefaultValue(..., sourceDialectName) classifies as unsupported for Dameng.","commonSituations":"Replicating MySQL tables with DEFAULT CURRENT_TIMESTAMP or other vendor-specific defaults into Dameng; schema evolution enabled; users noticing the DM column lacks the default after DDL is applied.","solutions":["Set the desired DEFAULT explicitly on the Dameng column with a manual ALTER TABLE statement after the sync DDL","Translate the source default to a Dameng-supported expression in the upstream table definition","Keep the same catalog (in-DM replication) so defaults are preserved verbatim","Adjust isSpecialDefaultValue/sqlClauseWithDefaultValue handling or use a custom dialect subclass to map supported defaults"],"exampleFix":"// before: default dropped by sync\nCREATE TABLE t (created DATETIME);\n// after: apply default manually on Dameng\nALTER TABLE t MODIFY created DATETIME DEFAULT SYSDATE;","handlingStrategy":"validation","validationCode":"// check default value compatibility before sync\nif (isSpecialDefaultValue(column.getDefaultValue(), sourceDialectName)) {\n    // plan a manual ALTER TABLE ... DEFAULT ... on Dameng\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Replace vendor-specific defaults (CURRENT_TIMESTAMP etc.) with literal defaults upstream","After sync, compare column defaults between source and Dameng and patch with ALTER TABLE","Use same-catalog (Dameng-to-Dameng) replication when defaults must be preserved","Keep defaults simple literals in synced schemas"],"tags":["jdbc","dameng","schema-evolution","default-value"],"backgroundTag":"unsupported-config-value","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"}