Skip to content

Commit 4a54818

Browse files
committed
Fix up test and comment
1 parent 10398cd commit 4a54818

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

datafusion/src/scalar.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ use std::{convert::TryFrom, fmt, iter::repeat, sync::Arc};
3434

3535
/// Represents a dynamically typed, nullable single value.
3636
/// This is the single-valued counter-part of arrow’s `Array`.
37-
//#[derive(PartialEq, Eq, PartialOrd, Ord, Hash, Clone)]
3837
#[derive(Clone)]
3938
pub enum ScalarValue {
4039
/// true or false value
@@ -1528,8 +1527,9 @@ mod tests {
15281527

15291528
#[test]
15301529
fn size_of_group_by_scalar() {
1531-
// ensure the size is not too large (??)
1532-
// TODO what are the implications of this being 64 bytes rather than 16 bytes?
1533-
assert_eq!(std::mem::size_of::<ScalarValue>(), 16);
1530+
// Since hash aggregations uses the size of a ScalarValue,
1531+
// making it larger means the grouping operation requires more
1532+
// memory per distinct value.
1533+
assert_eq!(std::mem::size_of::<ScalarValue>(), 64);
15341534
}
15351535
}

0 commit comments

Comments
 (0)