Files
greptimedb/src/sql
dennis zhuang 21e2255f4b fix(promql): info() ACL targets, per-series routing, reset collisions (#10385)
* fix(sql): include the table PromQL info() reads in extracted tables

`info(v)` and `info(v, {label="x"})` read `target_info`, which is not written
as a selector in the expression, so table-level permission targets missed it.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* fix(promql): keep per-series provenance behind CooperativeExec

`EnsureCooperative` wraps the `SeriesScanExec` leaf and rebuilds
`RawSeriesSourceExec` over the wrapper, which cleared `per_series_scan` and
left `SeriesFrameOutput` on the merge-inputs router.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* fix(promql): drop histogram pairs whose counter reset hints contradict

Prometheus returns the collision as the error of `+`/`-` and skips the pair
before counting its match. The native path kept the sample and counted it.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* fix(frontend): keep info() label selectors out of metric discovery

The table extractor now claims `target_info` only for the selector shape the
planner reads it with; other shapes stay unresolved. `MetricDiscoveryVisitor`
skips the label selector of `info`, which the planner never discovers with,
so an unresolved one is no longer answered by the caller's discoverable tables.

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

* test(promql): expect the dropped pair on a histogram reset hint collision

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>

---------

Signed-off-by: Dennis Zhuang <killme2008@gmail.com>
2026-11-12 21:51:00 -07:00
..