PromQL: Support instant queries#149379
Draft
sidosera wants to merge 6 commits into
Draft
Conversation
For INSTANT mode, rows arrive ascending by timestamp, so the most-recent value is the last row for each series, not the first.
Contributor
Author
|
@coderabbitai review pls. |
This comment was marked as outdated.
This comment was marked as outdated.
- Document the single-row Page(1) seed in createSelectorFreeInstantScalarPlan - Clarify instant query last-sample invariant in response builder - Add test: sourceFilterWindow floors short ranges to DEFAULT_LOOKBACK while resolveInstantQueryWindow respects the explicit window
…e range TStep uses right-boundary labeling; Bucket uses left-boundary. Switching all step-bucket creation to TStep shifted every bucket label forward by one step for open-ended range queries (no explicit start/end), breaking 253 EsqlSpecIT tests. Restore the original Bucket path when hasTimeRange() is false; use TStep only when start/end are present or for instant queries.
PROMQL step bucketing now always uses TStep (right-boundary labeling) to match Prometheus evaluation semantics. For queries without an explicit time range, epoch/MAX_MILLIS sentinels are used so TStep produces the correct bucket boundaries without requiring start/end. Update csv-spec expected step timestamps to reflect TStep right-boundary labeling: bucket covering (T-step, T] is labeled T instead of the left boundary T-step.
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.
As title.
Test: