mrhhsg opened a new pull request, #67962:
URL: https://github.com/apache/doris/pull/67962

   ### What problem does this PR solve?
   
   Issue Number: None
   
   Problem Summary:
   
   `ColumnStruct::update_crc32c_batch` / `update_crc32c_single` (and the
   xxHash / zlib-crc range variants) ignored the `null_map` passed in by an
   outer `ColumnNullable` and kept hashing the nested field columns. A NULL
   struct row can still carry an arbitrary hidden payload in its fields,
   for example `IF(cond, NULL, named_struct(...))` keeps the else-branch
   value under the NULL flag. Two logically equal NULL structs therefore got
   different hashes and the local hash shuffle sent them to different
   aggregation instances, so `GROUP BY` on a nullable struct key silently
   produced one extra group per distinct hidden payload.
   
   `ColumnArray` and `ColumnMap` already skip the NULL rows of the outer
   mask; this change applies the same pattern to `ColumnStruct` for every
   hash entry point that receives a null map. Rows without a null map keep
   the existing column-wise batch path, so hashes of non-NULL rows are
   unchanged.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test:
       - Unit Test: `ColumnStructTest.*RespectsOuterNullMap` cover crc32c
         batch/single, xxHash batch/range and zlib-crc range hashing of a
         nullable struct whose NULL rows carry different payloads.
       - Regression test:
         `query_p0/aggregate/aggregate_groupby_nullable_struct_local_shuffle`
         groups `IF(cond, NULL, named_struct(...))` keys through a local hash
         shuffle and checks the result matches the non-local-shuffle plan.
   - Behavior changed: No
   - Does this need documentation: No
   
   https://claude.ai/code/session_01WTHEM5JUWYV8RqrDr9B62p
   


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