thanos-io / promql-engine

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

logicalplan: best effort reduce constant expressions #458

Closed MichaHoffmann closed 4 months ago

MichaHoffmann commented 4 months ago

This PR adds a preprocessor pass that reduces constant expressions in a best effort way. This prevents fallback for the remaining functions that cannot take operator arguments in cases where those operators would just reduce to a constant number.