Skip to content

[Feature Request]: Time-bucketing / date-truncation functions (date_trunc, to_start_of_minute, ...) #24551

Closed

Description

@dengn

Version: 8.0.30-MatrixOne-v3.0.11 (MatrixOne v3.0.11)

There are no time-bucketing functions, which are needed for time-series rollups (metrics over time).

Reproduce

SELECT date_trunc('minute', ts) FROM t;     -- not supported
SELECT to_start_of_minute(ts)  FROM t;       -- not supported

Request
Add date_trunc(unit, ts) (and/or to_start_of_minute/hour/day) for grouping rows into time buckets.


Found while evaluating MatrixOne git4data / SQL as a data-versioning & agent-trace backend. Version: 8.0.30-MatrixOne-v3.0.11 (MatrixOne v3.0.11).

Testing background

Found in the same agent-trace / observability scenario: we wanted latency and error-rate time series (e.g. per-minute buckets) from a spans table, which needs time-bucketing/truncation.

Why it matters (expected purpose)

Time-bucketed rollups (date_trunc('minute', ts) etc.) are the basis of every monitoring chart. Their absence forces manual arithmetic on timestamps and blocks straightforward time-series queries over trace/telemetry data.

Activity

  1. added
    severity/s2
    on Jun 30, 2026
  2. added this to the MO-202607 milestone on Jun 30, 2026
  3. VioletQwQ-0 commented on Jul 7, 2026

    @VioletQwQ-0
    Collaborator

    Fixed by merged PR #24627: #24627

  4. VioletQwQ-0 commented on Jul 7, 2026

    @VioletQwQ-0
    Collaborator

    Closing as fixed by merged PR #24627.

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

Metadata

Metadata

Assignees

Labels

severity/s2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions