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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]