Skip to content

Commit

Permalink
Fix up test and comment
Browse files Browse the repository at this point in the history
  • Loading branch information
alamb committed Jul 27, 2021
1 parent 10398cd commit 4a54818
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions datafusion/src/scalar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ use std::{convert::TryFrom, fmt, iter::repeat, sync::Arc};

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

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

0 comments on commit 4a54818

Please sign in to comment.