findepi opened a new pull request, #17164: URL: https://github.com/apache/datafusion/pull/17164
Follows similar change for `WindowUDFImpl` and `AggregateUDFImpl`, i.e. the https://github.com/apache/datafusion/commit/8494a3967a413ef263a50b87ce8b5924eb1aa948 and https://github.com/apache/datafusion/commit/b8bf7c5bf1ae46e57b23a9728b2d66b525a999bd commits. Previously, the `ScalarUDFImpl` trait contained `equals` and `hash_value` methods with contracts following the `Eq` and `Hash` traits. However, the existence of default implementations of these methods made it error-prone, with many functions (scalar, aggregate, window) missing to customize the equals even though they ought to. There is no fix to this that's not an API breaking change, so a breaking change is warranted. Removing the default implementations would be enough of a solution, but at the cost of a lot of boilerplate needed in implementations. Instead, this removes the methods from the trait, and reuses `DynEq`, `DynHash` traits used previously only for physical expressions. This allows for functions to provide their implementations using no more than `#[derive(PartialEq, Eq, Hash)]` in a typical case. - follows https://github.com/apache/datafusion/pull/17081 - follows https://github.com/apache/datafusion/pull/17130 - fixes https://github.com/apache/datafusion/issues/16868 - fixes https://github.com/apache/datafusion/issues/16871 - closes https://github.com/apache/datafusion/issues/16677 -- 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