diff --git a/datafusion/physical-expr/src/aggregate/hyperloglog.rs b/datafusion/physical-expr/src/aggregate/hyperloglog.rs index bf25ecebcd66..a0d55ca71db1 100644 --- a/datafusion/physical-expr/src/aggregate/hyperloglog.rs +++ b/datafusion/physical-expr/src/aggregate/hyperloglog.rs @@ -68,6 +68,15 @@ const SEED: RandomState = RandomState::with_seeds( 0x0eaea5d736d733a4_u64, ); +impl Default for HyperLogLog +where + T: Hash + ?Sized, +{ + fn default() -> Self { + Self::new() + } +} + impl HyperLogLog where T: Hash + ?Sized, diff --git a/datafusion/sql/tests/sql_integration.rs b/datafusion/sql/tests/sql_integration.rs index 1dc0c491fd4e..652011fbac31 100644 --- a/datafusion/sql/tests/sql_integration.rs +++ b/datafusion/sql/tests/sql_integration.rs @@ -37,13 +37,6 @@ use datafusion_sql::{ use rstest::rstest; -#[cfg(test)] -#[ctor::ctor] -fn init() { - // Enable RUST_LOG logging configuration for tests - let _ = env_logger::try_init(); -} - #[test] fn parse_decimals() { let test_data = [ @@ -4161,3 +4154,10 @@ impl TableSource for EmptyTable { self.table_schema.clone() } } + +#[cfg(test)] +#[ctor::ctor] +fn init() { + // Enable RUST_LOG logging configuration for tests + let _ = env_logger::try_init(); +}