github-actions[bot] commented on code in PR #63479:
URL: https://github.com/apache/doris/pull/63479#discussion_r3340473281
##########
be/src/exec/common/hash_table/hash_key_type.h:
##########
@@ -118,6 +118,12 @@ inline HashKeyType get_hash_key_type(const
std::vector<DataTypePtr>& data_types)
t->get_primitive_type() == TYPE_JSONB) {
return HashKeyType::string_key;
}
+ if (t->get_primitive_type() == TYPE_VARIANT) {
+ throw Exception(ErrorCode::NOT_IMPLEMENTED_ERROR,
Review Comment:
This guard only runs after the single-key path reaches the
`!have_maximum_size_of_value()` branch. For multi-column hash keys,
`data_types.size() > 1` returns `get_hash_key_type_fixed(data_types)` at the
top of the function; if any key is `TYPE_VARIANT`, `get_hash_key_type_fixed()`
sees a non-fixed-size type and returns `HashKeyType::serialized` instead of
throwing. The serialized method then calls column serialization
(`ColumnVariant::serialize_value_into_arena` / related serialized-key paths),
which is explicitly not implemented for `ColumnVariant`, so queries such as
`GROUP BY id, v['arr']` or multi-key joins still fail later with a low-level
NOT_IMPLEMENTED rather than this controlled rejection. Please reject
`TYPE_VARIANT` before the multi-key early return, or make
`get_hash_key_type_fixed()` perform the same check while scanning all key types.
--
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]