Skip to content

logsql: fix stats_query_range metric order#1075

Open
func25 wants to merge 1 commit intomasterfrom
consistent-stats-query-range-column-order
Open

logsql: fix stats_query_range metric order#1075
func25 wants to merge 1 commit intomasterfrom
consistent-stats-query-range-column-order

Conversation

@func25
Copy link
Contributor

@func25 func25 commented Feb 6, 2026

Fixes #1011

Checklist

The following checks are mandatory:


Summary by cubic

Preserves metric order in /select/logsql/stats_query_range so it matches /select/logsql/stats_query. Fixes inconsistent series ordering observed in #1011.

  • Bug Fixes
    • Parser now returns ordered metric fields via GetStatsLabelsAndMetricFieldsAddGroupingByTime.
    • Range handler uses this order to sort results; histogram buckets follow their parent metric’s order.
    • Added tests for parser order and an end-to-end range vs instant order check.
    • Updated changelog entry for the endpoint behavior.

Written for commit d6e0078. Summary will update on new commits.

Copy link

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

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

No issues found across 5 files

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Vlogs datasource orders results alpahbetically not respecting query order

1 participant