Skip to content

Port percentile_approx from Comet #169

Closed as not planned
Closed as not planned

Description

@andygrove

Note

An LLM (Claude Code) created this issue. It compared the native expressions in Apache DataFusion Comet (native/spark-expr) with the functions in this crate. Check the details before you rely on them.

Is your feature request related to a problem or challenge?

Comet has a native, Spark-compatible implementation of percentile_approx that datafusion-spark does not have.

Spark expressions: percentile_approx, approx_percentile

Comet source (at 3878424d9):

Spark uses Greenwald-Khanna quantile summaries, so results match only if the algorithm is ported exactly.

Describe the solution you'd like

Port the implementation and its tests from Comet into datafusion-spark, and add .slt cases under crates/sqllogictest. Comet can then use the datafusion-spark version and remove its copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already existsenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions