CodeWithPravinMaske commented on PR #12608:
URL: https://github.com/apache/seatunnel/pull/12608#issuecomment-6010307115

   Thanks @SEZ9, all three are in:
   
   1. **Restore E2E**: 
`AbstractMysqlCDCITBase#testMysqlCdcNullInNullableUniqueKeyAfterRestore` (Zeta 
only, like the other restore tests). It snapshots the tables, runs `ALTER TABLE 
uk_added_null ADD UNIQUE KEY` and NULL inserts in the binlog phase, takes a 
savepoint, restores the job, inserts another NULL row into each table and 
asserts the sink holds NULL (and no `0`). After the restore, `uk_added_null`'s 
schema comes from the table history saved in the savepoint, since it changed in 
the binlog phase. The binlog insert step is shared with 
`testMysqlCdcNullInNullableUniqueKeyWithoutPrimaryKey`. It passes locally.
   2. **Comments on the override**: the class Javadoc says it is a copy of 
Debezium 1.9.8, that `parsePrimaryIndexColumnNames` is the only modified 
method, and that the change must be re-applied (or the copy dropped) when 
upgrading Debezium. The method Javadoc explains why: Debezium also uses it to 
promote a unique key, which can hold NULLs, so only a real primary key marks 
its columns NOT NULL.
   3. **F4 assertion**: 
`MySqlSchemaTest#testNullableColumnConfiguredAsPrimaryKeyEmitsNull` builds the 
catalog table through `CatalogTableUtils.mergeCatalogTableConfig(catalogTable, 
config)` with `primaryKeys = ["code"]` (the real `table-names-config` path, 
which marks the catalog column NOT NULL). It then checks that the Debezium 
column stays optional, and that converting a row with NULL in `code` through 
the Debezium table schema yields NULL, not `0`. With Debezium's original 
behaviour restored, this test fails, as do the 3 other nullability tests.
   


-- 
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]

Reply via email to