jonahgao commented on code in PR #11571: URL: https://github.com/apache/datafusion/pull/11571#discussion_r1686201995
########## datafusion/functions/src/math/log.rs: ########## @@ -82,7 +82,13 @@ impl ScalarUDFImpl for LogFunc { } fn output_ordering(&self, input: &[ExprProperties]) -> Result<SortProperties> { - match (input[0].sort_properties, input[1].sort_properties) { + let (base_sort_properties, num_sort_properties) = if input.len() == 1 { + // log(x) defaults to log(10, x) + (SortProperties::Singleton, input[0].sort_properties) + } else { + (input[0].sort_properties, input[1].sort_properties) + }; + match (num_sort_properties, base_sort_properties) { Review Comment: Fixed the `nulls_first` problem for `log` by https://github.com/apache/datafusion/pull/11571/commits/3feeaa85718e0ce257cceb06004f56ec6267e424. We can create separate PRs for other fixes. cc @2010YOUY01 @berkaysynnada -- 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