mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-28 13:44:03 +00:00
Review of the first draft found two things it got wrong. Deferring the cross-piece conflict check to the merge boundary is only sound while the output still holds the positions that collided. A `clamp` whose bounds are inverted turns every value into a missing one, so the merge sees empty fragments, finds nothing to compare, and the query succeeds with an empty answer where it owed a duplicate-label-set error. The rule is now stated: output whose conflicts have not been checked yet may only pass through point-wise operations that keep every field's positions. Either move the cut before the clearing operation, or refuse that tree. The identity table also flattened `Window` into "drops metadata". It does not: `last_over_time` and `first_over_time` keep the metric name. Treating them as identity-merging would merge two series that are still distinct, or report a conflict between outputs that never collided. The table now says which functions drop and which keep, and separates the owner key from the canonical key so a coarse owner is not mistaken for a coarse merge. Two smaller corrections. The piece-lifetime obstacle describes an older stack: #9777's `e1a631018c29` already declines to consult `is_last` when recording occupancy, so this RFC now names its dependency baseline instead of asking for work that exists. And an empty logical series does not always need a closing event - dropping a group that was never handed downstream is fine - so the requirement is scoped to what the first version will actually emit. Four acceptance cases are written as cases rather than categories, because the clearing-`clamp` one and the `last_over_time` one are exactly the ones a category would miss. Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>