thanos-io / promql-engine

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

Replace parser.Expr with custom Node object #428

Closed fpetkovski closed 3 months ago

fpetkovski commented 3 months ago

This commit introduces a Node interface which is going to contain methods specific to logical nodes. Some of those methods will be Clone, Marshal, Children etc.

In order to keep the changeset manageable, the interface just embeds parser.Expr and allows us to maintain backwards compatibility with the rest of the codebase.

Subsequent changes will remove coupling from parser.Expr and start using Node everywhere.