Skip to content

PromQL label lookups with match[] fail on ClickHouse 26.11 (timeSeriesSelector needs return_columns) #3825

Backlog

Description

@bcanvural

On ClickHouse 26.11, PromQL label lookups that pass match[] fail with Table default.<db> does not exist. On a PromQL source with the table-function backend, that breaks dashboard variable dropdowns; tiles still work.

26.11 added a required return_columns argument to timeSeriesSelector(). The 5-argument call that getSeriesSelectorCondition (packages/api/src/controllers/timeseriesEngine.ts) sends, ('db', 'table', selector, min, max), is now read as (table, selector, min, max, return_columns), so 'db' is taken as the table. 26.10 and earlier reject a sixth argument.

Repro

SET allow_experimental_time_series_table = 1;
CREATE DATABASE db;
CREATE TABLE db.ts ENGINE = TimeSeries;
SELECT count() FROM timeSeriesSelector('db', 'ts', 'up', now64(3) - 600, now64(3));
-- 26.10.3.7: works
-- 26.11.1.2942: Table default.db does not exist (UNKNOWN_TABLE)

Workaround: switch the source's PromQL backend to clickhouse-http if the server has the prometheus_api_v1 handler.

Fix: #3824

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions