Skip to content

Commit 48d866b

Browse files
committed
fix comments
1 parent c667883 commit 48d866b

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎src/paimon/common/reader/blob_fallback_batch_reader.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,8 @@ Result<std::shared_ptr<arrow::Array>> BlobFallbackBatchReader::AssembleColumn(
342342
if (overlap_start < overlap_end) {
343343
if (chunk.array == nullptr) {
344344
return Status::Invalid(
345-
"Unexpected: a gap row was chosen as a blob fallback result.");
345+
"Unexpected: a gap or skipped row was chosen as a blob fallback "
346+
"result.");
346347
}
347348
std::shared_ptr<arrow::Array> column = chunk.array->field(field_idx);
348349
pieces.push_back(

‎src/paimon/common/reader/blob_fallback_batch_reader.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ class BlobFallbackBatchReader : public BatchReader {
101101
struct Chunk {
102102
std::shared_ptr<arrow::StructArray> array;
103103
int64_t length = 0;
104-
/// Gap chunk only: the row id of each of the `length` rows, filled when the read
105-
/// schema contains _ROW_ID so all-placeholder rows can keep their row id.
104+
/// Newest-group gap chunks only: one row id per row, filled when _ROW_ID is requested.
105+
/// Empty for older groups and skipped runs.
106106
std::vector<int64_t> gap_row_ids;
107107
};
108108

@@ -158,9 +158,9 @@ class BlobFallbackBatchReader : public BatchReader {
158158
int32_t field_idx, const std::vector<int32_t>& group_choice,
159159
const std::vector<std::vector<Chunk>>& group_chunks) const;
160160

161-
/// Assembles the _ROW_ID values of rows [run_start, run_end) from the given group's chunks;
162-
/// gap chunks contribute their synthesized row ids. Shares the newest group's assembly
163-
/// cursor with runs that explicitly choose that group.
161+
/// Assembles _ROW_ID values of rows [run_start, run_end) from the newest group's chunks.
162+
/// Requires _ROW_ID in the read schema. This group has no skipped runs, so every null-array
163+
/// chunk is a gap with complete gap_row_ids. Shares its cursor with runs choosing group 0.
164164
Result<std::shared_ptr<arrow::Array>> AssembleRowIdRun(const std::vector<Chunk>& chunks,
165165
int64_t run_start, int64_t run_end,
166166
ChunkCursor* cursor) const;

0 commit comments

Comments
 (0)