Skip to content

test(reader): end-to-end delete-application tests (position, equality, mixed) - #3087

Open
JanKaul wants to merge 1 commit into
apache:mainfrom
lakekeeper:test/reader-delete-application
Open

test(reader): end-to-end delete-application tests (position, equality, mixed)#3087
JanKaul wants to merge 1 commit into
apache:mainfrom
lakekeeper:test/reader-delete-application

Conversation

@JanKaul

@JanKaul JanKaul commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Which issue does this PR close?

None — this is additional test coverage.

What changes are included in this PR?

ArrowReader already loads and applies both position and equality deletes, but the existing tests cover the loader / predicate / row-group pieces in isolation. There's no end-to-end coverage (read() → assert surviving rows) for scenarios that combine or stack delete files.

This adds an arrow::reader::delete_application test module with five end-to-end tests:

  • a single equality delete removes exactly the matching rows;
  • multiple equality delete files targeting one data file (keys unioned);
  • multiple position delete files targeting one data file (positions unioned);
  • mixed position + equality deletes on the same data file;
  • a fully-deleted data file yields no rows.

Each test writes a small data file and its delete file(s) to a TempDir, reads them through ArrowReader::read() with a local-filesystem FileIO, and asserts the surviving ids.

Are these changes tested?

Yes — the five new tests pass (cargo test -p iceberg). They use only the public reader API (ArrowReaderBuilder, FileScanTask, FileScanTaskDeleteFile, FileIO::new_with_fs) and need no external services.

…, mixed)

Add a `delete_application` test module that exercises `ArrowReader::read()` over a
data file plus one or more delete files and asserts the surviving rows. The reader
already loads and applies position and equality deletes, but the existing tests
cover the loader / predicate / row-group pieces in isolation; there was no
end-to-end coverage for scenarios that combine or stack delete files. New tests:

- a single equality delete removes exactly the matching rows,
- multiple equality delete files targeting one data file (keys unioned),
- multiple position delete files targeting one data file (positions unioned),
- mixed position + equality deletes on the same data file,
- a data file whose every row is deleted yields no rows.

The module uses only the public reader API (ArrowReaderBuilder / FileScanTask /
FileScanTaskDeleteFile / FileIO) and a local filesystem FileIO, so it needs no
external services.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Jan Kaul <jankaul@mailbox.org>
@JanKaul
JanKaul force-pushed the test/reader-delete-application branch from 77e3d43 to f73e7d1 Compare August 28, 2026 07:05
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