From 24689b1bda1f8e6ac87160f4ec9b599eb6b7edfe Mon Sep 17 00:00:00 2001 From: KevinyhZou <37431499+KevinyhZou@users.noreply.github.com> Date: Wed, 6 Dec 2023 10:36:10 +0800 Subject: [PATCH] [GLUTEN-3908][CH]Improve insert range selective for column nullable (#472) (cherry picked from commit b8dfba5b9ca42c00313adc43119cf843a36e0e68) (cherry picked from commit 86b5622186c587dce1031601487bf62c1d0881e2) (cherry picked from commit 87ef298537a7716946307a31bb95368a6addeab1) (cherry picked from commit b08ae0a8ff8549c29c4bc2e735a3ae6ab9f33cbe) (cherry picked from commit 0e1242efb4308a5dfd3959e9443d028609bd4912) --- src/Columns/ColumnNullable.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Columns/ColumnNullable.cpp b/src/Columns/ColumnNullable.cpp index 1b3109527ec4..d7674bffdbbd 100644 --- a/src/Columns/ColumnNullable.cpp +++ b/src/Columns/ColumnNullable.cpp @@ -249,16 +249,8 @@ void ColumnNullable::insertRangeFrom(const IColumn & src, size_t start, size_t l void ColumnNullable::insertRangeSelective(const IColumn & src, const IColumn::Selector & selector, size_t selector_start, size_t length) { const ColumnNullable & nullable_col = static_cast(src); + getNullMapColumn().insertRangeSelective(*nullable_col.null_map, selector, selector_start, length); getNestedColumn().insertRangeSelective(*nullable_col.nested_column, selector, selector_start, length); - - if (!memoryIsZero(nullable_col.getNullMapData().data(), 0, nullable_col.size())) - { - getNullMapColumn().insertRangeSelective(*nullable_col.null_map, selector, selector_start, length); - } - else - { - getNullMapColumn().insertManyDefaults(length); - } } void ColumnNullable::insert(const Field & x)