Skip to content

[FLINK-40303][table] Skip non-key NOT NULL checks for key-only deletes - #28883

Open
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/40303
Open

[FLINK-40303][table] Skip non-key NOT NULL checks for key-only deletes#28883
Au-Miner wants to merge 2 commits into
apache:masterfrom
Au-Miner:fix/40303

Conversation

@Au-Miner

@Au-Miner Au-Miner commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Key-only DELETE records set non-key fields to null. When a sink declares NOT NULL constraints on non-key columns, the constraint enforcer incorrectly rejects these valid DELETE records.

Brief change log

  • Pass the input changelog's key-only DELETE semantic and sink primary key indices from CommonExecSink to ConstraintEnforcerExecutor.
  • Update NotNullConstraint to skip non-key fields for key-only DELETE records while continuing to validate primary key fields.
  • Add semantic coverage for writing a key-only DELETE to a sink with a NOT NULL non-key column.

Verifying this change

Added INSERT_SELECT_DELETE_BY_KEY_DELETE_BY_KEY_WITH_NOT_NULL_SINK to DeletesByKeySemanticTests. The test covers a key-only source and sink, verifies that ChangelogNormalize can remain eliminated, and expects -D[1, null] to be accepted by a sink whose non-key column is NOT NULL.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): no
  • The public API, i.e., is any changed class annotated with @Public(Evolving): no
  • The serializers: no
  • The runtime per-record code paths (performance sensitive): no
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: no
  • The S3 file system connector: no

Documentation

  • Does this pull request introduce a new feature? no
  • If yes, how is the feature documented? not applicable

@flinkbot

flinkbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

…s sink

AI-Contributed/Feature: 0/46
AI-Contributed/UT: 0/30
AI-Contributed/Feature: 0/0
AI-Contributed/UT: 0/2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants