kosiew commented on code in PR #23053:
URL: https://github.com/apache/datafusion/pull/23053#discussion_r3445542165


##########
datafusion/functions-aggregate/src/approx_distinct.rs:
##########
@@ -829,11 +829,14 @@ fn is_hll_groups_type(data_type: &DataType) -> bool {
 #[cfg(test)]
 mod tests {
     use super::*;
+    #[cfg(not(feature = "force_hash_collisions"))]

Review Comment:
   Small cleanup suggestion: the repeated `#[cfg(not(feature = 
"force_hash_collisions"))]` annotations on the imports, helpers, and tests 
could be moved to a nested cfg-gated module instead.
   
   That would keep the behavior the same while making the invariant easier to 
see in one place. For example, this could be shaped as 
   ```rust
   #[cfg(not(feature = "force_hash_collisions"))]
   mod real_hash_tests {
       use super::*;
   
       use arrow::array::{AsArray, Int64Array, StringViewArray};
       use std::sync::Arc;
   
       const LONG: &str = "...";
   
       fn distinct_count(...) -> u64 {
           ...
       }
   
       ...
   }
   ```
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to