DanielLeens commented on issue #12415: URL: https://github.com/apache/seatunnel/issues/12415#issuecomment-5760330959
Classification: E / Connector-V2 JDBC generated MySQL DDL. Confirmed on current `dev`: both `MysqlCreateTableSqlBuilder` and `OceanBaseMysqlCreateTableSqlBuilder` render `NULL` whenever column metadata is nullable, then append `PRIMARY KEY (...)` when `create_index` is enabled. That is the exact invalid DDL described here, and it affects the existing top-level `primary_keys` path as well as the new multi-table mapping. PR #12015 deliberately does not change either builder, so it is not a fix for this issue; I found no other open fix PR. The minimal fix should be local to generated DDL: when a column belongs to the resolved primary key, emit `NOT NULL` without mutating the upstream `Column` metadata or changing non-key nullable columns. Please cover the MySQL and OceanBase MySQL-mode builders, preserve the behavior when `create_index = false`, and extend the existing JDBC MySQL E2E path so an auto-created target table with a nullable source-key declaration succeeds and has the intended primary key. Please link a focused PR here before implementation. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
