vikrantmehta123 opened a new pull request, #27064: URL: https://github.com/apache/datafusion/pull/27064
## Which issue does this PR close? - Closes #26985. ## Rationale for this change There was inconsistency in the behavior of the `approx_distinct` function for floats depending on whether they appeared on their own vs whether they appeared in a list/struct/map. User would have gotten inconsistent behavior when running the `approx_distinct` function. ## What changes are included in this PR? Reject the `approx_distinct`, when the datatype is floats or contains floats. - `is_supported_type` function now decides whether the function supports datatype or not. This rejects floats using the existing `has_float_leaf` method - `is_encoded_type` method is removed; it's logic is included in the `is_supported_type` method. - `accumulator()` checks whether the type is supported or not. If supported, only then it initializes accumulators. ## What is the testing strategy for this PR? SLTS are added in `aggregate.slt` to ensure that all container types reject `approx_distinct` on floats. ## Are there any user-facing changes? Yes, in that the user will get consistent behavior when he/she is running `approx_distinct` queries on different data types. -- 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]
