Skip to content

Proposal: Add DDSketch (Relative-Error Quantile Sketch) #457

@geonove

Description

@geonove

Proposal: Add DDSketch (Relative-Error Quantile Sketch)

Summary:
This issue proposes adding an implementation of DDSketch, a mergeable quantile sketch with relative-error guarantees, to the datasketches-cpp library.

Benefits:

  • Relative-error guarantees
  • Mergeability for distributed processing
  • Predictable memory usage
  • Used in production (Datadog, OpenTelemetry)

References

Proposed Design

  • New class under ddsketch.hpp
  • Logarithmic mapping of input values to buckets using configurable relative accuracy
  • Compact, bounded memory footprint with optional bucket collapsing
  • Mergeable histogram-style structure
  • Serialization and deserialization support
  • Unit tests and benchmarks included

Compatibility

  • No changes to existing APIs
  • Implementation will be self-contained
  • Optional: initial release could be marked experimental

Next Steps

If there is community interest, I’m happy to:

  1. Share a detailed design document
  2. Begin work on the implementation and submit a PR
  3. Iterate based on feedback

Would the maintainers be open to including DDSketch? Are there specific design or compatibility considerations I should address before proceeding?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions