Skip to content

PromQL: Implement converting PromQLTree to string#97063

Merged
nikitamikhaylov merged 3 commits intoClickHouse:masterfrom
vitlibar:implement-converting-promql-tree-to-string
Feb 20, 2026
Merged

PromQL: Implement converting PromQLTree to string#97063
nikitamikhaylov merged 3 commits intoClickHouse:masterfrom
vitlibar:implement-converting-promql-tree-to-string

Conversation

@vitlibar
Copy link
Member

@vitlibar vitlibar commented Feb 16, 2026

Changelog category (leave one):

  • Not for changelog (changelog entry is not required)

Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):

Implement converting PromQLTree to string and use this conversion to simplify function timeSeriesSelector().

@vitlibar vitlibar added the comp-promql Issues related to the PromQL support and TimeSeries table engine. label Feb 16, 2026
@clickhouse-gh
Copy link
Contributor

clickhouse-gh bot commented Feb 16, 2026

Workflow [PR], commit [6e1c9ef]

Summary:

@clickhouse-gh clickhouse-gh bot added pr-not-for-changelog This PR should not be mentioned in the changelog submodule changed At least one submodule changed in this PR. labels Feb 16, 2026
@vitlibar vitlibar changed the title Implement converting promql tree to string PromQL: Implement converting PromQLTree to string Feb 16, 2026
@vitlibar vitlibar force-pushed the implement-converting-promql-tree-to-string branch from 8c46a88 to 4b2bf76 Compare February 16, 2026 10:22
@vitlibar vitlibar force-pushed the implement-converting-promql-tree-to-string branch from 4b2bf76 to 437f28b Compare February 16, 2026 11:02
StringLiteral() { node_type = NodeType::StringLiteral; result_type = ResultType::STRING; }
Node * clone(std::vector<std::unique_ptr<Node>> & node_list_) const override;
String dumpNode(const PrometheusQueryTree & tree, size_t indent) const override;
String toString(const PrometheusQueryTree & tree) const override;
Copy link
Member Author

@vitlibar vitlibar Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR adds function toString() which outputs a PrometheusQueryTree to string in the format which can be parsed back.

@vitlibar
Copy link
Member Author

Ready for review

@vitlibar vitlibar force-pushed the implement-converting-promql-tree-to-string branch from 437f28b to 6e1c9ef Compare February 17, 2026 09:10
@nikitamikhaylov nikitamikhaylov added this pull request to the merge queue Feb 20, 2026
Merged via the queue into ClickHouse:master with commit 024c2f8 Feb 20, 2026
147 checks passed
@robot-ch-test-poll2 robot-ch-test-poll2 added the pr-synced-to-cloud The PR is synced to the cloud repo label Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp-promql Issues related to the PromQL support and TimeSeries table engine. pr-not-for-changelog This PR should not be mentioned in the changelog pr-synced-to-cloud The PR is synced to the cloud repo submodule changed At least one submodule changed in this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants