HappenLee commented on code in PR #40559:
URL: https://github.com/apache/doris/pull/40559#discussion_r1751217843
##########
be/src/vec/common/hash_table/hash_map_context.h:
##########
@@ -284,29 +285,59 @@ struct MethodStringNoCache : public MethodBase<TData> {
using State =
ColumnsHashing::HashMethodString<typename Base::Value, typename
Base::Mapped, true>;
- std::vector<StringRef> stored_keys;
+ // need keep until the hash probe end.
+ std::vector<StringRef> _build_stored_keys;
+ // refresh each time probe
+ std::vector<StringRef> _stored_keys;
size_t serialized_keys_size(bool is_build) const override {
- return stored_keys.size() * sizeof(StringRef);
+ return is_build ? (_build_stored_keys.size() * sizeof(StringRef))
+ : (_stored_keys.size() * sizeof(StringRef));
}
- void init_serialized_keys(const ColumnRawPtrs& key_columns, size_t
num_rows,
- const uint8_t* null_map = nullptr, bool is_join
= false,
- bool is_build = false, uint32_t bucket_size = 0)
override {
- const IColumn& column = *key_columns[0];
- const auto& column_string = assert_cast<const ColumnString&>(
- column.is_nullable()
- ? assert_cast<const
ColumnNullable&>(column).get_nested_column()
- : column);
+ void serialized_str_32(const ColumnString& column_string,
std::vector<StringRef>& stored_keys) {
Review Comment:
use lambda to do the work
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]