From 7b082c5f8ee3b066b509039d91c3a10ad1e2ad10 Mon Sep 17 00:00:00 2001 From: Hu Shenggang Date: Thu, 30 Apr 2026 15:05:40 +0800 Subject: [PATCH] [chore](be) Refine tablet reader context and generic reader handling Issue Number: None Related PR: None Problem Summary: Remove unused reader context and generic reader fields in the current staged changes so the reader path stays aligned with the current output-column and batch-size handling. None - Test: No need to test (commit current staged tracked changes only) - Behavior changed: No - Does this need documentation: No --- be/src/format/generic_reader.h | 4 ---- be/src/storage/rowset/rowset_reader_context.h | 3 --- be/src/storage/tablet/tablet_reader.cpp | 4 ---- 3 files changed, 11 deletions(-) diff --git a/be/src/format/generic_reader.h b/be/src/format/generic_reader.h index 57e9d1736b7045..606024f5d4d43c 100644 --- a/be/src/format/generic_reader.h +++ b/be/src/format/generic_reader.h @@ -261,10 +261,6 @@ class GenericReader : public ProfileCollector { const size_t _MIN_BATCH_SIZE = 4064; // 4094 - 32(padding) - // never let batch size be 0 because _do_get_next_block uses it as the - // upper bound of a `while (block->rows() < batch_size)` loop and a 0 would make the reader - // return without setting eof, causing the scanner to spin on empty blocks. - const size_t _DEFAULT_BATCH_SIZE = 4064; // 4094 - 32(padding) TPushAggOp::type _push_down_agg_type {}; public: diff --git a/be/src/storage/rowset/rowset_reader_context.h b/be/src/storage/rowset/rowset_reader_context.h index 6332ab51fc2089..bf5a27535dd13a 100644 --- a/be/src/storage/rowset/rowset_reader_context.h +++ b/be/src/storage/rowset/rowset_reader_context.h @@ -76,9 +76,6 @@ struct RowsetReaderContext { // Effective adaptive batch size byte budget. 0 means disabled internally. size_t preferred_block_size_bytes = 8388608UL; - // Points to the "true" output column list before non-direct-mode expansion. - // Used by BlockReader to map expanded storage columns back to the requested output layout. - const std::vector* origin_return_columns = nullptr; bool is_unique = false; //record row num merged in generic iterator uint64_t* merged_rows = nullptr; diff --git a/be/src/storage/tablet/tablet_reader.cpp b/be/src/storage/tablet/tablet_reader.cpp index 55d256c634deda..73d68e883257f9 100644 --- a/be/src/storage/tablet/tablet_reader.cpp +++ b/be/src/storage/tablet/tablet_reader.cpp @@ -201,10 +201,6 @@ Status TabletReader::_capture_rs_readers(const ReaderParams& read_params) { // Propagate general read limit for DUP_KEYS and UNIQUE_KEYS with MOW _reader_context.general_read_limit = read_params.general_read_limit; - // Preserve the original requested output layout so BlockReader can map expanded storage - // columns (for non-direct AGG/UNIQUE paths) back to the final output block. - _reader_context.origin_return_columns = read_params.origin_return_columns; - return Status::OK(); }