mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-18 00:34:11 +00:00
feat(promql): draw the native tree as plan lines with per-node metrics The fused node prints its own compiled tree instead of echoing the PromQL text it was built from: one node per line inside a `native_tree=[ ... ]` block, with each node's figures on its own line when the statement ran. A split aggregate's two halves therefore show the trees they compute rather than the same statement, and EXPLAIN/ANALYZE of a native statement reads like the plan it runs. The statement text stays on the node as data: it is what names the value columns (`expression_field_names`), so it has to survive to execution and over the wire where a node is rebuilt from its envelope. What changes is that it is no longer what the node prints. The tree's registrations sit in the node's own metric set, so a reader that keys by name reads that set; `ExecutionPlan::metrics` leaves them out because a flat set cannot say which node recorded what. Signed-off-by: discord9 <discord9@163.com>