thanos-io / promql-engine

Multi-threaded PromQL engine implementation based on the Volcano paper.
Apache License 2.0
141 stars 54 forks source link

Set correct query opts for distributed subqueries #386

Closed fpetkovski closed 9 months ago

fpetkovski commented 9 months ago

When distributing aggregations which are part of a subquery, we need to use subquery opts rather than the root query opts.

The approach is not completely optimal since we need to reassemble the parent path and jump through a bunch of pointers. As a follow up we can modify the TraverseBottomUp function to pass in the entire parent path instead of only the immediate parent.