Add native aggregation support for Largest Triangle Three Bucket (LTTB) downsampling

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Integration
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Overview

      Add native aggregation support for the Largest Triangle Three Bucket (LTTB) downsampling algorithm. This is a standard technique for reducing large time series datasets to a fixed number of visually representative points, widely needed for IoT and telemetry workloads.

      Background

      LTTB is a well-established downsampling algorithm used extensively in time series visualization. It selects a subset of N points from an input dataset that best preserves the visual shape of the data — retaining spikes, trends, and inflection points while discarding visually redundant samples.

      Competing databases offer LTTB natively. MongoDB users today must approximate it using complex multi-stage pipelines with $bucket, $group, and nested $reduce expressions. This workaround has significant limitations.

      Proposed Interface

      The implementation could take the form of a new aggregation stage and/or an accumulator. Exact interface TBD during design. At minimum it should accept:

      • t — the x-axis (time) field expression
      • y — the y-axis (value) field expression
      • n — target number of output point

      References

      • Steinarsson (2013): Downsampling Time Series for Visual Representation (original LTTB paper, University of Iceland)

            Assignee:
            Nishith Atreya
            Reporter:
            Arun Banala
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: