From fa3d4ebfbe3b0d9ea701cde883d0011c1c63db71 Mon Sep 17 00:00:00 2001 From: "cai.zhang" Date: Tue, 4 Nov 2025 20:25:37 +0800 Subject: [PATCH] fix: Compute the correct batch size for the geometry index of the growing segment (#45253) issue: #44648 Signed-off-by: Cai Zhang --- internal/core/src/exec/expression/Expr.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/core/src/exec/expression/Expr.h b/internal/core/src/exec/expression/Expr.h index 0d83a58ffc..4b50d4960d 100644 --- a/internal/core/src/exec/expression/Expr.h +++ b/internal/core/src/exec/expression/Expr.h @@ -1177,10 +1177,6 @@ class SegmentExpr : public Expr { return ProcessChunksForValidByOffsets( use_index, input); } - case DataType::GEOMETRY: { - return ProcessChunksForValidByOffsets( - use_index, input); - } default: ThrowInfo(DataTypeInvalid, "unsupported element type: {}", @@ -1297,7 +1293,11 @@ class SegmentExpr : public Expr { auto size = std::min( std::min(size_per_chunk_ - data_pos, batch_size_ - processed_rows), int64_t(chunk_valid_res.size())); - + if (field_type_ == DataType::GEOMETRY && + segment_->type() == SegmentType::Growing) { + size = std::min(batch_size_ - processed_rows, + int64_t(chunk_valid_res.size()) - data_pos); + } valid_result.append(chunk_valid_res, data_pos, size); return size; }