PromQL: Improve parser#94091
Merged
nikitamikhaylov merged 8 commits intoClickHouse:masterfrom Jan 26, 2026
Merged
Conversation
1 task
Contributor
|
Workflow [PR], commit [d0739ab] Summary: ❌
|
c6aedb0 to
2376b56
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 28 out of 40 changed files in this pull request and generated 2 comments.
Comments suppressed due to low confidence (1)
src/Parsers/Prometheus/parseTimeSeriesTimestamp.cpp:1
- On line 560,
millisecondsis being added toscaled_seconds, butmillisecondsshould bescaled_milliseconds(computed earlier). The current code adds unscaled milliseconds to scaled seconds, producing incorrect results.
#include <Parsers/Prometheus/parseTimeSeriesTimestamp.h>
…re between digits).
419ce37 to
7ca2d0f
Compare
7ca2d0f to
5478eb1
Compare
5478eb1 to
c66a6bb
Compare
8adb206 to
c6be808
Compare
c6be808 to
83892f3
Compare
Member
Author
|
Ready for review |
| UnaryOperator(-) | ||
| ScalarLiteral(1) | ||
| )"); | ||
|
|
Member
There was a problem hiding this comment.
Can you please also add these queries? https://github.com/prometheus/compliance/blob/3de836d255ffc98bbf7d58eb487b7662b496d047/promql/promql-test-queries.yml#L34-L42
Queries .123, 1.23e-3, 0x3d, +Inf, NaN look very interesting.
Member
Author
There was a problem hiding this comment.
done
I also added most of other queries from https://github.com/prometheus/compliance/blob/main/promql/promql-test-queries.yml to this test.
Member
Author
|
CI failures are unrelated |
Merged
via the queue into
ClickHouse:master
with commit Jan 26, 2026
b290c0a
129 of 132 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Improve PromQL parser:
1_000_000)Part of #89356