Skip to content

[FLUSS #558] [test] Add Rust integration coverage for RecordBatchLogReader bounded reads.#559

Open
slfan1989 wants to merge 1 commit into
apache:mainfrom
slfan1989:fluss-558
Open

[FLUSS #558] [test] Add Rust integration coverage for RecordBatchLogReader bounded reads.#559
slfan1989 wants to merge 1 commit into
apache:mainfrom
slfan1989:fluss-558

Conversation

@slfan1989
Copy link
Copy Markdown

Purpose

Linked issue: close #558

Add Rust-level integration coverage for RecordBatchLogReader bounded reads.

RecordBatchLogReader already has unit coverage for batch filtering and Python binding coverage for to_arrow_batch_reader guard/drop behavior, but it lacks Rust end-to-end integration coverage for:

  • new_until_offsets stopping semantics
  • new_until_latest with partitioned log tables

This PR adds those missing integration tests.

Brief change log

  • Added a Rust integration test for RecordBatchLogReader::new_until_offsets.

    • Creates a log table.
    • Appends records.
    • Subscribes from a non-zero offset.
    • Reads with an explicit stopping offset.
    • Verifies records at or beyond the stop offset are not returned.
  • Added a Rust integration test for RecordBatchLogReader::new_until_latest on partitioned tables.

    • Creates a partitioned log table.
    • Adds US and EU partitions.
    • Appends records to both partitions.
    • Subscribes partition buckets.
    • Verifies all records present at reader creation are returned.
  • Updated the comment in RecordBatchLogReader to point to the new Rust integration coverage.

Tests

Verified locally.

API and Format

No API or storage format changes.

Documentation

No user-facing documentation changes.

@slfan1989
Copy link
Copy Markdown
Author

@fresh-borzoni @leekeiabstraction Could you please help review this PR when you have time?

Copy link
Copy Markdown
Member

@fresh-borzoni fresh-borzoni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@slfan1989 Ty for the PR, great addition, LGTM overall, couple of minor comments 👍

Let's move this to a separate file for testing RecordBatchLogReader feature and then add some additional scenarios:
*until_offsets_with_empty_range (stop == start -> no batches)

  • until_offsets_past_end_of_log (graceful finish past actual end)
  • until_offsets_multi_bucket (multiple buckets in the HashMap)

also extract_ids_from_batches overlaps with extract_ids in test_project test, mb we wish to factor this out to utils and reuse.

@fresh-borzoni
Copy link
Copy Markdown
Member

@charlesdong1991 Can you also take a look, please?
Since this was initially your feature to propose :)

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.

[test] Add Rust integration coverage for RecordBatchLogReader bounded reads

2 participants