Skip to content

[core] Add delete-row.thin-mode for primary-key tables - #10863

Open
discivigour wants to merge 6 commits into
apache:masterfrom
discivigour:j/delete-row-fields-projection
Open

discivigour wants to merge 6 commits into
apache:masterfrom
discivigour:j/delete-row-fields-projection

Conversation

@discivigour

Copy link
Copy Markdown
Contributor

Purpose

Whole-record DELETE rows currently store nullable payload values that are unnecessary for applying the deletion. Add delete-row.thin-mode (default: false) to write these fields as null in primary-key data files, including clustering files.

Preserve primary-key, sequence, record-level time, clustering, and non-null fields, along with the record's RowKind and sequence number. The physical schema is unchanged, and this option is independent of data-file.thin-mode. Changelog files retain their original payloads.

Schema validation requires a primary-key table using deduplicate, or partial-update/aggregation with whole-record deletion enabled, and rejects postpone bucket tables (bucket = -2). The option is disabled by default because audit-log and delta readers that expose data-file DELETE rows can observe the cleared fields; disabling it later cannot restore values already written as null.

Tests

35 targeted tests passed on c3d63e14a3, with Checkstyle and Spotless enabled:

  • DeleteRowFieldsProjectorTest and DeleteRowFieldsTest: default-off behavior, required fields, filtering, compaction, reinsertion, and create/alter/dynamic-option validation.
  • SchemaValidationTest#testDeleteRowThinMode*: supported and unsupported table configurations.
  • KeyValueFileReadWriteTest#testDeleteRowFieldsProjection+testDeleteRowFieldsProjectionInClusteringFile: Avro/ORC/Parquet, both data-file thin-mode settings, clustering fields, and unchanged changelog payloads.
  • PrimaryKeySortedIndexReadTest and PrimaryKeyBlobFileWriterTest: indexed reads with deletion vectors and blob writer regressions.

@discivigour
discivigour force-pushed the j/delete-row-fields-projection branch from c3d63e1 to 81828c9 Compare October 29, 2026 09:04
@discivigour
discivigour marked this pull request as ready for review October 29, 2026 09:59
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.

1 participant