From 02f047fb10c7fea6ec7dbfc4484069c91db0cea5 Mon Sep 17 00:00:00 2001 From: amorynan Date: Tue, 2 Apr 2024 12:20:29 +0800 Subject: [PATCH] fixed --- be/src/vec/columns/column_array.h | 2 +- be/src/vec/columns/column_map.h | 2 +- be/src/vec/columns/column_string.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/be/src/vec/columns/column_array.h b/be/src/vec/columns/column_array.h index 08fbb03ce716d8..25a06717ac6f89 100644 --- a/be/src/vec/columns/column_array.h +++ b/be/src/vec/columns/column_array.h @@ -220,7 +220,7 @@ class ColumnArray final : public COWHelper { const uint32_t* indices_end) override; void replace_column_data(const IColumn& rhs, size_t row, size_t self_row = 0) override { - DCHECK(self_row != 0 && size() == self_row + 1); + DCHECK(self_row == 0 || (self_row != 0 && size() == self_row + 1)); const auto& r = assert_cast(rhs); const size_t nested_row_size = r.size_at(row); const size_t r_nested_start_off = r.offset_at(row); diff --git a/be/src/vec/columns/column_map.h b/be/src/vec/columns/column_map.h index 81fa0cd9a0a559..0f69d14380a7ad 100644 --- a/be/src/vec/columns/column_map.h +++ b/be/src/vec/columns/column_map.h @@ -137,7 +137,7 @@ class ColumnMap final : public COWHelper { } void replace_column_data(const IColumn& rhs, size_t row, size_t self_row = 0) override { - DCHECK(self_row != 0 && size() == self_row + 1); + DCHECK(self_row == 0 || (self_row != 0 && size() == self_row + 1)); const auto& r = assert_cast(rhs); const size_t nested_row_size = r.size_at(row); const size_t r_key_nested_start_off = r.offset_at(row); diff --git a/be/src/vec/columns/column_string.h b/be/src/vec/columns/column_string.h index 8e13876614b2d4..aa07892e50be4e 100644 --- a/be/src/vec/columns/column_string.h +++ b/be/src/vec/columns/column_string.h @@ -552,7 +552,7 @@ class ColumnString final : public COWHelper { // replace_column_data() with a batch column data. // and this column is cleared at the every beginning. next we replace column one by one, so // the self_row is only equals size() - 1. - DCHECK(self_row != 0 && size() == self_row + 1); + DCHECK(self_row == 0 || (self_row != 0 && size() == self_row + 1)); const auto& r = assert_cast(rhs); auto data = r.get_data_at(row);