Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
31736ef
feat: support lat-mat (not tested)
zhf999 Aug 21, 2026
c57e1c3
cache and forward read ranges
zhf999 Aug 21, 2026
76b8317
fix: not use the bitmap from inner read
zhf999 Aug 21, 2026
4a5fa3b
fix: support SeekToRow
zhf999 Aug 21, 2026
b74258d
test: add test cases
zhf999 Aug 21, 2026
4b0a106
test: add projection feature for MockFileBatchReader
zhf999 Aug 24, 2026
f7fa513
fix: set read ranges only when read range are not empty
zhf999 Aug 24, 2026
428a567
style: refractor code and add comments
zhf999 Aug 24, 2026
2d81627
fix: support memory pool
zhf999 Aug 24, 2026
7507692
fix: support calling NextBatch
zhf999 Aug 24, 2026
0325f65
style: add TODOs
zhf999 Aug 24, 2026
e5e2a6a
feat: add support LM builder
zhf999 Aug 24, 2026
1ab5805
feat: install LM reader below PrefetchFileBatchReader
zhf999 Aug 24, 2026
913f222
fix: normalize arrow array after slicing
zhf999 Aug 24, 2026
19bb106
feat: enable context options for LatMat
zhf999 Aug 24, 2026
7f44acd
pre-commit
zhf999 Aug 24, 2026
95fe958
fix: forward PrefetchFileBatchReader::PreBufferRange to fix cache issues
zhf999 Aug 25, 2026
dc124e2
fix: diable lat-mat in previout tests and add new tests for lat-mat
zhf999 Aug 25, 2026
369d97f
fix: lat-mat not controlled by enable-prefetch
zhf999 Aug 25, 2026
f0a7f75
refractor
zhf999 Aug 25, 2026
4925c4e
style: add comments
zhf999 Aug 25, 2026
f1f1c76
fix: lat-mat silently fails when format is avro or blob
zhf999 Aug 25, 2026
708dadf
fix: minor issues in LM reader
zhf999 Aug 25, 2026
029e5e1
fix: predicate issues
zhf999 Aug 25, 2026
660be34
fix: clang-tidy
zhf999 Aug 25, 2026
66916f3
add TODOs
zhf999 Aug 25, 2026
d366c12
test: restore behavior of merge_file_split_read_test
zhf999 Aug 25, 2026
9215628
pre-commit
zhf999 Aug 25, 2026
99854b4
Merge branch 'main' into lat-mat
zhf999 Aug 25, 2026
86a0e99
fix: reset LM reader state on Close
zhf999 Aug 26, 2026
7f47127
fix: return invalid when bitmap is empty
zhf999 Aug 26, 2026
68ad0e8
test: update test cases
zhf999 Aug 26, 2026
5851143
test: diable lat-mat in paimon-global-index-test and paimon-blob-tabl…
zhf999 Aug 26, 2026
3f654c7
feat: support non-prefetch format (avro, blob, etc.)
zhf999 Aug 26, 2026
a02e7f5
test: update lat-mat tests
zhf999 Aug 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion include/paimon/read_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class PAIMON_EXPORT ReadContext {
const std::vector<std::string>& read_field_names,
const std::vector<int32_t>& read_field_ids,
const std::shared_ptr<Predicate>& predicate, bool enable_predicate_filter,
bool enable_prefetch, uint32_t prefetch_batch_count,
bool enable_prefetch, bool enable_late_materializing, uint32_t prefetch_batch_count,
uint32_t prefetch_max_parallel_num, bool enable_multi_thread_row_to_batch,
uint32_t row_to_batch_thread_number, const std::optional<std::string>& table_schema,
const std::shared_ptr<MemoryPool>& memory_pool,
Expand Down Expand Up @@ -97,6 +97,9 @@ class PAIMON_EXPORT ReadContext {
bool EnablePrefetch() const {
return enable_prefetch_;
}
bool EnableLateMaterializing() const {
return enable_late_materializing_;
}
uint32_t GetPrefetchBatchCount() const {
return prefetch_batch_count_;
}
Expand Down Expand Up @@ -163,6 +166,7 @@ class PAIMON_EXPORT ReadContext {
std::shared_ptr<Predicate> predicate_;
bool enable_predicate_filter_;
bool enable_prefetch_;
bool enable_late_materializing_;
uint32_t prefetch_batch_count_;
uint32_t prefetch_max_parallel_num_;
bool enable_multi_thread_row_to_batch_;
Expand Down Expand Up @@ -306,6 +310,15 @@ class PAIMON_EXPORT ReadContextBuilder {
/// @return Reference to this builder for method chaining.
ReadContextBuilder& EnablePrefetch(bool enabled);

/// Enable or disable late materialization (probe/payload two-phase reads). When enabled,
/// each parallel reader under the prefetch layer performs a probe read of predicate
/// columns first and only materializes payload columns for matched rows.
/// @param enabled Whether to enable late materialization (default: false)
/// @return Reference to this builder for method chaining.
/// @note Without a pushed-down predicate the late-materializing reader degrades to a
/// plain passthrough.
ReadContextBuilder& EnableLateMaterializing(bool enabled);

/// Enable or disable the read-ahead cache for read operations.
///
/// A read-ahead cache is used to prebuffer data ranges before they are needed,
Expand Down
2 changes: 1 addition & 1 deletion include/paimon/reader/prefetch_file_batch_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class PAIMON_EXPORT PrefetchFileBatchReader : public FileBatchReader {
/// Retrieves the row number of the next row to be read.
/// This method indicates the current read position within the file.
/// @return The row number of the next row to read.
virtual uint64_t GetNextRowToRead() const = 0;
virtual Result<uint64_t> GetNextRowToRead() const = 0;

/// Generates a list of row ranges to be read in batches.
/// Each range specifies the start and end row numbers for a batch,
Expand Down
2 changes: 2 additions & 0 deletions src/paimon/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ set(PAIMON_COMMON_SRCS
common/predicate/starts_with.cpp
common/reader/batch_reader.cpp
common/reader/concat_batch_reader.cpp
common/reader/late_materializing_file_batch_reader.cpp
common/reader/predicate_batch_reader.cpp
common/reader/prefetch_file_batch_reader_impl.cpp
common/reader/reader_utils.cpp
Expand Down Expand Up @@ -606,6 +607,7 @@ if(PAIMON_BUILD_TESTS)
common/predicate/predicate_utils_test.cpp
common/predicate/predicate_validator_test.cpp
common/reader/concat_batch_reader_test.cpp
common/reader/late_materializing_file_batch_reader_test.cpp
common/reader/predicate_batch_reader_test.cpp
common/reader/prefetch_file_batch_reader_impl_test.cpp
common/reader/reader_utils_test.cpp
Expand Down
Loading