zclllyybb commented on code in PR #18942: URL: https://github.com/apache/doris/pull/18942#discussion_r1176150300
########## be/src/vec/exprs/vbloom_predicate.cpp: ########## @@ -94,18 +94,34 @@ Status VBloomPredicate::execute(VExprContext* context, Block* block, int* result if (type.is_string_or_fixed_string()) { // When _be_exec_version is equal to or greater than 2, we use the new hash method. // This is only to be used if the be_exec_version may be less than 2. If updated, please delete it. + // remove virtual function call in get_data_at to improve performance (argument_column->get_data_at(i)). + auto column_nested = reinterpret_cast<const ColumnNullable*>(argument_column.get()) + ->get_nested_column_ptr(); + auto column_nullmap = reinterpret_cast<const ColumnNullable*>(argument_column.get()) + ->get_null_map_column_ptr(); if (_be_exec_version >= 2) { for (size_t i = 0; i < sz; i++) { - /// TODO: remove virtual function call in get_data_at to improve performance - auto ele = argument_column->get_data_at(i); - const StringRef v(ele.data, ele.size); - ptr[i] = _filter->find_crc32_hash(reinterpret_cast<const void*>(&v)); + if (assert_cast<const ColumnUInt8&>(*column_nullmap).get_data()[i] != 0) { + StringRef v((const char*)nullptr, 0); + ptr[i] = _filter->find_crc32_hash(reinterpret_cast<const void*>(&v)); + } else { + auto ele = assert_cast<const ColumnString*>(column_nested.get()) + ->get_string_data_at(i); Review Comment: do not add this, just use `get_data_at` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org