This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new a8a5cbb403 [Opt](Hash) Deduce virtual function call is null at in single nullable column (#16650) a8a5cbb403 is described below commit a8a5cbb403f3bc380f7319d1160e930c376e6045 Author: HappenLee <happen...@hotmail.com> AuthorDate: Tue Feb 14 08:44:12 2023 +0800 [Opt](Hash) Deduce virtual function call is null at in single nullable column (#16650) --- be/src/vec/common/columns_hashing.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/be/src/vec/common/columns_hashing.h b/be/src/vec/common/columns_hashing.h index 64888a7beb..06f0773fc8 100644 --- a/be/src/vec/common/columns_hashing.h +++ b/be/src/vec/common/columns_hashing.h @@ -215,7 +215,7 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod { return nullptr; } - ColumnRawPtrs key_columns; + const ColumnNullable* key_column; static const ColumnRawPtrs get_nested_column(const IColumn* col) { auto* nullable = check_and_get_column<ColumnNullable>(*col); @@ -227,11 +227,11 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod { HashMethodSingleLowNullableColumn(const ColumnRawPtrs& key_columns_nullable, const Sizes& key_sizes, const HashMethodContextPtr& context) : Base(get_nested_column(key_columns_nullable[0]), key_sizes, context), - key_columns(key_columns_nullable) {} + key_column(assert_cast<const ColumnNullable*>(key_columns_nullable[0])) {} template <typename Data> ALWAYS_INLINE EmplaceResult emplace_key(Data& data, size_t row, Arena& pool) { - if (key_columns[0]->is_null_at(row)) { + if (key_column->is_null_at(row)) { bool has_null_key = data.has_null_key_data(); data.has_null_key_data() = true; @@ -261,7 +261,7 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod { template <typename Data, typename Func, typename CreatorForNull> ALWAYS_INLINE typename std::enable_if_t<has_mapped, Mapped>& lazy_emplace_key( Data& data, size_t row, Arena& pool, Func&& f, CreatorForNull&& null_creator) { - if (key_columns[0]->is_null_at(row)) { + if (key_column->is_null_at(row)) { bool has_null_key = data.has_null_key_data(); data.has_null_key_data() = true; if (!has_null_key) std::forward<CreatorForNull>(null_creator)(data.get_null_key_data()); @@ -277,7 +277,7 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod { ALWAYS_INLINE typename std::enable_if_t<has_mapped, Mapped>& lazy_emplace_key( Data& data, size_t row, Arena& pool, size_t hash_value, Func&& f, CreatorForNull&& null_creator) { - if (key_columns[0]->is_null_at(row)) { + if (key_column->is_null_at(row)) { bool has_null_key = data.has_null_key_data(); data.has_null_key_data() = true; if (!has_null_key) std::forward<CreatorForNull>(null_creator)(data.get_null_key_data()); @@ -291,7 +291,7 @@ struct HashMethodSingleLowNullableColumn : public SingleColumnMethod { template <typename Data> ALWAYS_INLINE FindResult find_key(Data& data, size_t row, Arena& pool) { - if (key_columns[0]->is_null_at(row)) { + if (key_column->is_null_at(row)) { bool has_null_key = data.has_null_key_data(); if constexpr (has_mapped) return FindResult(&data.get_null_key_data(), has_null_key); --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org