thanos-io / promql-engine

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

Do not strip parenthesis #395

Closed fpetkovski closed 6 months ago

fpetkovski commented 6 months ago

Trimming parenthesis leads to bugs with distributed query evaluation because Prometheus does not properly stringify subquery expressions when they are not wrapped.

For example, the query max_over_time((bar/bar)[30s:15s]) gets transformed into max_over_time(bar/bar[30s:15s]).

fpetkovski commented 6 months ago

Hm, this seems to break explicit assertions now, like timestamp((bar)).