Skip to content

[Feature]: Have LTTB return all columns #810

@deanna-abrams

Description

@deanna-abrams

What problem does the new feature solve?

LTTB is a very useful function that downsamples data. However, it only returns the time and the value from the downsampled rows. It would be very useful to have access to the values of other columns from the downsampled rows.

What does the feature do?

perhaps something like

SELECT
    grouping_column,
    (lttb_data).time,
    (lttb_data).value,
    (lttb_data).non_grouping_column_value
FROM (
    SELECT
      grouping_column,
      UNNEST(lttb(time, float_value, $<nPoints>)) AS lttb_data
    FROM hypertable
    GROUP BY grouping_column
)

Implementation challenges

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature-requestAnd area of analysis that could be made easier

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions