This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 48523c0172e branch-3.0: [fix](iceberg) fix the iceberg eq-delete
filter resize-fill bug. #51253 (#51315)
48523c0172e is described below
commit 48523c0172e5b0aa9347266116a4f886b4f0731b
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Thu May 29 19:16:30 2025 +0800
branch-3.0: [fix](iceberg) fix the iceberg eq-delete filter resize-fill
bug. #51253 (#51315)
Cherry-picked from #51253
Co-authored-by: kang <[email protected]>
---
be/src/vec/common/pod_array.h | 4 ++++
be/src/vec/exec/format/table/equality_delete.cpp | 6 ++++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/be/src/vec/common/pod_array.h b/be/src/vec/common/pod_array.h
index 2cfabaa5faf..e1afcafb69e 100644
--- a/be/src/vec/common/pod_array.h
+++ b/be/src/vec/common/pod_array.h
@@ -392,6 +392,8 @@ public:
this->c_end = this->c_start + this->byte_size(n);
}
+ /// reset the array capacity
+ /// fill the new additional elements using the value
void resize_fill(size_t n, const T& value) {
size_t old_size = this->size();
if (n > old_size) {
@@ -617,6 +619,8 @@ public:
}
}
+ /// reset the array capacity
+ /// replace the all elements using the value
void assign(size_t n, const T& x) {
this->resize(n);
std::fill(begin(), end(), x);
diff --git a/be/src/vec/exec/format/table/equality_delete.cpp
b/be/src/vec/exec/format/table/equality_delete.cpp
index 94f807a408b..83f56200e7e 100644
--- a/be/src/vec/exec/format/table/equality_delete.cpp
+++ b/be/src/vec/exec/format/table/equality_delete.cpp
@@ -56,7 +56,8 @@ Status SimpleEqualityDelete::filter_data_block(Block*
data_block) {
if (_filter == nullptr) {
_filter = std::make_unique<IColumn::Filter>(rows, 0);
} else {
- _filter->resize_fill(rows, 0);
+ // reset the array capacity and fill all elements using the 0
+ _filter->assign(rows, UInt8(0));
}
if (column_and_type->column->is_nullable()) {
@@ -126,7 +127,8 @@ Status MultiEqualityDelete::filter_data_block(Block*
data_block) {
if (_filter == nullptr) {
_filter = std::make_unique<IColumn::Filter>(rows, 1);
} else {
- _filter->resize_fill(rows, 1);
+ //reset the array capacity and fill all elements using the 0
+ _filter->assign(rows, UInt8(1));
}
auto* filter_data = _filter->data();
for (size_t i = 0; i < rows; ++i) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]