Omkar-Wagholikar commented on code in PR #27544:
URL: https://github.com/apache/datafusion/pull/27544#discussion_r4669668437


##########
datafusion/optimizer/src/analyzer/resolve_grouping_function.rs:
##########
@@ -248,8 +248,7 @@ fn grouping_function_on_id(
         // Mask the ordinal bits above position `n` so only the semantic 
bitmask is visible.
         // checked_shl returns None when n >= 64 (all bits are semantic), 
mapping to u64::MAX.
         let semantic_mask: u64 = 1u64.checked_shl(n as u32).map_or(u64::MAX, 
|m| m - 1);
-        let masked_id =
-            bitwise_and(grouping_id_column.clone(), literal(semantic_mask as 
usize));
+        let masked_id = bitwise_and(grouping_id_column, literal(semantic_mask 
as usize));

Review Comment:
   Copying here from my 
[comment](https://github.com/apache/datafusion/pull/27544#issuecomment-7000829002)
 so that none of your comments are hanging: The as usize truncation in is 
fairly older than this PR. To keep this PR to its title, I would prefer to fix 
it and other similar instances that I can find separately under a new issue.



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