andygrove opened a new issue, #7400:
URL: https://github.com/apache/datafusion-comet/issues/7400

   ## What is the problem the feature request solves?
   
   Part of #7397.
   
   Spark 4.1+ provides `approx_top_k`, `approx_top_k_accumulate`, 
`approx_top_k_combine` and `approx_top_k_estimate`, built on the DataSketches 
frequent-items sketch. None of them run natively in Comet. The crate's 
`frequencies` feature provides the sketch.
   
   ## Describe the potential solution
   
   1. Score the family with `suggest-native-expression` first.
   2. Audit the crate's `frequencies` feature against DataSketches-Java 6.2.0 
using committed fixtures. The item type matters here more than in the other 
families: Spark supports several item types, and each has its own item 
serialization in the sketch bytes, so check each one Spark accepts rather than 
only strings. Also check tie-breaking and the order of returned items, the 
error bounds, and how Spark derives the maximum map size from its arguments.
   3. Implement the serde and native functions once the audit shows byte parity 
for every supported item type, opt-in until then. Fall back for any item type 
that is not covered.
   4. Add SQL file tests, including a Spark-produced sketch column read by 
Comet and the reverse.
   


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