Skip to content

test: add ut for prefetch file batch reader#277

Merged
lucasfang merged 4 commits into
alibaba:mainfrom
lucasfang:add_test
May 13, 2026
Merged

test: add ut for prefetch file batch reader#277
lucasfang merged 4 commits into
alibaba:mainfrom
lucasfang:add_test

Conversation

@lucasfang
Copy link
Copy Markdown
Collaborator

@lucasfang lucasfang commented May 12, 2026

Purpose

add ut for prefetch file batch reader for test coverage

Tests

PrefetchFileBatchReaderImplTest

RefreshReadRangesDisablePrefetchByAdaptiveStrategy
SetReadRangesReturnErrorWhenPushDownFailed
NeedInitCacheNeverMode
WorkloopSetReadStatusWhenCacheInitFailed
DoReadBatchReturnOkWhenShutdown
DoReadBatchReturnOkWhenNoCurrentReadRange

API and Format

Documentation

Generative AI tooling

Copilot AI review requested due to automatic review settings May 12, 2026 08:04
@lucasfang lucasfang changed the title add ut for prefetch file batch reader test: add ut for prefetch file batch reader May 12, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Adds additional unit tests to improve coverage for PrefetchFileBatchReaderImpl, including adaptive-prefetch behavior and failure/edge-path handling.

Changes:

  • Introduce controlled mock reader/builder to deterministically control read ranges and injected failures.
  • Add UTs covering adaptive-prefetch disabling, pushdown failure propagation, cache init failure, and edge conditions in read loop/batch reads.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp
Comment thread src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp
Comment thread src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp
Comment thread src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp
Comment thread src/paimon/common/reader/prefetch_file_batch_reader_impl_test.cpp
Copy link
Copy Markdown
Collaborator

@lxy-9602 lxy-9602 left a comment

Choose a reason for hiding this comment

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

+1

@lucasfang lucasfang merged commit 5363e61 into alibaba:main May 13, 2026
9 checks passed
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.

3 participants