[Trino] Split long-format results into one series per label

Open
#936 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

@dougkirkley is already working on this.

Since Nov 16, 2026.

  • #941 by @dougkirkley — open

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript

Research direction

Read the Trino time-series query handling changed in the review of #931 and follow-up pull request #941. Check how it currently converts numeric columns into series, then determine how label values should group rows and appear as series names and labels. Done when each distinct label combination produces its own series and results without label columns retain current behavior.

Written by the indexing model from the issue text.

Description

enhancement

Follow-up from the review of #931.

The Trino time-series query turns each numeric column into one series ("wide" format). A result in "long" format, with one row per timestamp and label value, for example:

SELECT date_trunc('minute', ts) AS time, host, avg(cpu) AS value
FROM metrics GROUP BY 1, 2

becomes a single value series mixing every host, instead of one series per host.

Proposal: treat non-time, non-numeric columns as labels, and group rows by their label values into separate series, each named from its labels and carrying them as series labels. Results with no label columns keep today's behaviour.

Dominant language
TypeScript
Stars
33
Forks
95
Avg merge
2d 12h
Merged PRs (30d)
40

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from perses/plugins

All issues in perses/plugins

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.