{"record":{"id":"4decb1c8420a63e3","repo":"apache/seatunnel","slug":"damengdb-does-not-support-modifying-the-text-type","errorCode":null,"errorMessage":"DamengDB does not support modifying the TEXT type directly. Please use ALTER TABLE MODIFY COLUMN to change the column type.","messagePattern":"DamengDB does not support modifying the TEXT type directly\\. Please use ALTER TABLE MODIFY COLUMN to change the column type\\.","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":305,"sourceCode":"                    AlterTableModifyColumnEvent.modify(event.tableIdentifier(), event.getColumn()));\n        }\n    }\n\n    @Override\n    public void applySchemaChange(\n            Connection connection, TablePath tablePath, AlterTableModifyColumnEvent event)\n            throws SQLException {\n        Column column = event.getColumn();\n        String sourceDialectName = event.getSourceDialectName();\n        boolean sameCatalog = StringUtils.equals(dialectName(), sourceDialectName);\n        // string conversion length will be extended by 4 in cross-database.\n        // eg: mysql varchar(10) -> Dameng varchar(40)\n        BasicTypeDefine typeDefine = getTypeConverter().reconvert(column);\n        String columnType = sameCatalog ? column.getSourceType() : typeDefine.getColumnType();\n        if (event.getTypeChanged() != null\n                && event.getTypeChanged()\n                && DM_TEXT.equals(typeDefine.getColumnType())) {\n            log.warn(\n                    \"DamengDB does not support modifying the TEXT type directly. \"\n                            + \"Please use ALTER TABLE MODIFY COLUMN to change the column type.\");\n        }\n        // Build the SQL statement that modifies the column\n        StringBuilder sqlBuilder =\n                new StringBuilder(\"ALTER TABLE \")\n                        .append(tableIdentifier(tablePath))\n                        .append(\" MODIFY \")\n                        .append(quoteIdentifier(column.getName()))\n                        .append(\" \")\n                        .append(columnType);\n\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) {","sourceCodeStart":287,"sourceCodeEnd":323,"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#L287-L323","documentation":"This is a log warning (not an exception) emitted during schema-change application by the Dameng (DM) JDBC dialect. When an incoming CDC schema-change event modifies a column's type and the target DM column type resolves to DM's TEXT type, the dialect cannot express that change safely in a single ALTER and only logs a warning. The generated ALTER TABLE ... MODIFY statement that follows may not perform the intended TEXT-type modification.","triggerScenarios":"Calling applySchemaChange on a Dameng table with a SchemaChangeEvent where event.getTypeChanged() is true and the reconverted target column type equals DM_TEXT (e.g. a MySQL varchar/text column being synced into a DM TEXT column).","commonSituations":"MySQL->Dameng full/incremental sync jobs where the upstream column type changes to something that maps to DM TEXT; schema evolution enabled on the DM sink; users expecting automatic type-change DDL to succeed.","solutions":["Manually run 'ALTER TABLE <table> MODIFY <column> <TYPE>' on the Dameng database to change the column type, then re-run/restart the sync job","Exclude the type change from the schema-change event or disable type-change evolution for the DM sink","Map the upstream column to a non-TEXT DM type (e.g. VARCHAR/LONGVARCHAR/CLOB) so the ALTER can be generated","Check the DmdbTypeConverter reconvert mapping for the source column and adjust sourceType so it does not resolve to DM_TEXT"],"exampleFix":"// before: relies on automatic type-change DDL\nALTER TABLE t MODIFY col TEXT;\n// after: pre-apply manually on Dameng, then let the job continue\nALTER TABLE t MODIFY col CLOB; -- or desired type, done manually before schema change arrives","handlingStrategy":"validation","validationCode":"// before applying schema change, check target type\nif (event.getTypeChanged() != null && event.getTypeChanged()\n        && \"TEXT\".equalsIgnoreCase(targetColumnType)) {\n    // pre-run manually: ALTER TABLE t MODIFY col <TYPE>; on Dameng\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Monitor sink logs for this warning when schema evolution is enabled","Pre-align column types between source and Dameng before starting CDC","Avoid mapping change-prone columns to DM TEXT; prefer VARCHAR/CLOB","Document manual DDL steps required for TEXT type changes"],"tags":["jdbc","dameng","schema-evolution","ddl"],"backgroundTag":"unsupported-operation","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"}