You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/11/25 11:57:04 UTC

[GitHub] [arrow-datafusion] crepererum commented on a diff in pull request #4371: feat: `ResourceExhausted` for memory limit in `GroupedHashAggregateStream`

crepererum commented on code in PR #4371:
URL: https://github.com/apache/arrow-datafusion/pull/4371#discussion_r1032385224


##########
datafusion/common/src/scalar.rs:
##########
@@ -2295,7 +2295,7 @@ impl ScalarValue {
     /// Estimate size if bytes including `Self`. For values with internal containers such as `String`
     /// includes the allocated size (`capacity`) rather than the current length (`len`)
     pub fn size(&self) -> usize {
-        std::mem::size_of_val(&self)
+        std::mem::size_of_val(self)

Review Comment:
   The tests panicked due to an integer underflow. Apart that the vector/hashmap calculations were wrong, this here was also kinda tricky: the size of `&ScalarValue` is 8 bytes, not 48 :facepalm:.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org