goldmedal commented on code in PR #10661: URL: https://github.com/apache/datafusion/pull/10661#discussion_r1615197488
########## datafusion/functions-aggregate/src/lib.rs: ########## @@ -96,3 +96,31 @@ pub fn register_all(registry: &mut dyn FunctionRegistry) -> Result<()> { Ok(()) } + +#[cfg(test)] +mod tests { + use crate::all_default_aggregate_functions; + use datafusion_common::Result; + use std::collections::HashSet; + + #[test] + fn test_no_duplicate_name() -> Result<()> { + let mut names = HashSet::new(); + for func in all_default_aggregate_functions() { + assert!( + names.insert(func.name().to_string().to_lowercase()), Review Comment: I think the function name and alias should be case-insensitive. Therefore, lowercase them here. -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org