JingsongLi opened a new pull request, #9094: URL: https://github.com/apache/paimon/pull/9094
## What changed - add the immutable `primary-key.nullable` table option, disabled by default - normalize primary-key field nullability from the option and reject it on non-primary-key tables - preserve nullable primary-key schemas through Flink Catalog without publishing a Flink SQL primary-key constraint - support nullable key validation and nulls-first key ordering in PyPaimon - document null-safe key equality and add core, Flink, and Python regression coverage This change targets Paimon primary-key tables and does not rely on Spark `upsert-key`. ## Why Some upstream systems can produce null components in logical merge keys. Paimon previously rewrote every primary-key field to `NOT NULL`, preventing true primary-key tables from representing and consistently merging these records. With the option enabled, null components use null-safe equality, so repeated records for keys such as `(1, NULL)` merge as the same key. ## User impact Existing tables remain unchanged because the option defaults to `false`. Tables that opt in can write, compact, read, update, and delete records whose primary-key components are null. The option is immutable after the table has snapshots. For Flink, nullable primary keys are declared with the `primary-key` table option because Flink SQL primary-key constraints imply `NOT NULL`. ## Validation - Core: `SchemaBuilderTest`, `SchemaValidationTest#testNullablePrimaryKeyRequiresPrimaryKeyTable`, and `PrimaryKeySimpleTableTest#testNullablePrimaryKey` (7 tests) - Flink 1.x: `FlinkCatalogTest#testNullablePrimaryKeyExposedAsTableOption` - PyPaimon: targeted schema, merge-buffer, and reader tests (25 tests), plus Flake8 - Spotless checks for changed Java and Scala modules - generated configuration docs via the `paimon-docs` `generate-docs` profile -- 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]
