From 4a54818baa15cc7bc1eb814748b601a402b31136 Mon Sep 17 00:00:00 2001 From: Andrew Lamb Date: Tue, 27 Jul 2021 14:13:47 -0400 Subject: [PATCH] Fix up test and comment --- datafusion/src/scalar.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/datafusion/src/scalar.rs b/datafusion/src/scalar.rs index 6c862bdae759d..ed03f2cb9aa8e 100644 --- a/datafusion/src/scalar.rs +++ b/datafusion/src/scalar.rs @@ -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 @@ -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::(), 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::(), 64); } }