apache/seatunnel · warning

DamengDB does not support modifying the TEXT type directly.

Error message

DamengDB does not support modifying the TEXT type directly. Please use ALTER TABLE MODIFY COLUMN to change the column type.

What it means

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.

Source

Thrown at seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/internal/dialect/dm/DmdbDialect.java:305

                    AlterTableModifyColumnEvent.modify(event.tableIdentifier(), event.getColumn()));
        }
    }

    @Override
    public void applySchemaChange(
            Connection connection, TablePath tablePath, AlterTableModifyColumnEvent event)
            throws SQLException {
        Column column = event.getColumn();
        String sourceDialectName = event.getSourceDialectName();
        boolean sameCatalog = StringUtils.equals(dialectName(), sourceDialectName);
        // string conversion length will be extended by 4 in cross-database.
        // eg: mysql varchar(10) -> Dameng varchar(40)
        BasicTypeDefine typeDefine = getTypeConverter().reconvert(column);
        String columnType = sameCatalog ? column.getSourceType() : typeDefine.getColumnType();
        if (event.getTypeChanged() != null
                && event.getTypeChanged()
                && DM_TEXT.equals(typeDefine.getColumnType())) {
            log.warn(
                    "DamengDB does not support modifying the TEXT type directly. "
                            + "Please use ALTER TABLE MODIFY COLUMN to change the column type.");
        }
        // Build the SQL statement that modifies the column
        StringBuilder sqlBuilder =
                new StringBuilder("ALTER TABLE ")
                        .append(tableIdentifier(tablePath))
                        .append(" MODIFY ")
                        .append(quoteIdentifier(column.getName()))
                        .append(" ")
                        .append(columnType);

        // Handle null constraints
        // DamengDB does not direct support modifying the NULL to NOT-NUll constraint directly.
        // if supported, need update null value to defaultvalue, then modify the column to NOT NULL.
        // this is a high-risk operation, so we do not support it.
        boolean targetColumnNullable = columnIsNullable(connection, tablePath, column.getName());
        if (column.isNullable() != targetColumnNullable && !targetColumnNullable) {

View on GitHub (pinned to cf67b549a7)

Solutions

  1. Manually run 'ALTER TABLE <table> MODIFY <column> <TYPE>' on the Dameng database to change the column type, then re-run/restart the sync job
  2. Exclude the type change from the schema-change event or disable type-change evolution for the DM sink
  3. Map the upstream column to a non-TEXT DM type (e.g. VARCHAR/LONGVARCHAR/CLOB) so the ALTER can be generated
  4. Check the DmdbTypeConverter reconvert mapping for the source column and adjust sourceType so it does not resolve to DM_TEXT

Example fix

// before: relies on automatic type-change DDL
ALTER TABLE t MODIFY col TEXT;
// after: pre-apply manually on Dameng, then let the job continue
ALTER TABLE t MODIFY col CLOB; -- or desired type, done manually before schema change arrives
Defensive patterns

Strategy: validation

Validate before calling

// before applying schema change, check target type
if (event.getTypeChanged() != null && event.getTypeChanged()
        && "TEXT".equalsIgnoreCase(targetColumnType)) {
    // pre-run manually: ALTER TABLE t MODIFY col <TYPE>; on Dameng
}

Prevention

When it happens

Trigger: 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).

Common situations: 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.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10). Data as JSON: /api/errors/4decb1c8420a63e3. Report an issue: GitHub.