github-actions[bot] commented on code in PR #62713:
URL: https://github.com/apache/doris/pull/62713#discussion_r3193594496


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/plans/commands/info/CreateDictionaryInfo.java:
##########
@@ -211,9 +211,6 @@ private void validateAndSetColumns(Table table) throws 
DdlException {
     }
 
     private void validateKeyColumn(Column source) throws DdlException {
-        if (source.getType().isComplexType()) {

Review Comment:
   Removing the complex-key rejection also allows `MAP` keys, but the BE 
HASH_MAP dictionary lookup uses serialized key bytes 
(`ComplexHashMapDictionary::load_data()` / `get_tuple_columns()` call 
`init_serialized_keys`). `ColumnMap::serialize_impl()`, `compare_at()`, and 
`update_hash_with_value()` all walk entries in physical order, so a dictionary 
row inserted with `{2:'y', 3:'z'}` is not found by `dict_get(..., map(3, 'z', 
2, 'y'))` even though this is the same SQL map value. The new regression and BE 
tests only query maps in the same order as inserted, so they miss this. Please 
either normalize/deduplicate/sort map entries before hashing, or keep `MAP` 
unsupported as dictionary keys until the dictionary key equality matches MAP 
semantics.



-- 
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]

Reply via email to