mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-11-29 14:14:13 +00:00
One tree per partition is too strong an assumption in two places. A label rewrite can turn two different raw series into one logical series, and the two pieces then sit in two independent execution states; a later window sees one point from each and answers nothing, so the query is empty rather than wrong. And the distribution a series needs - whole, contiguous, ordered - was never declared beyond the raw key. The design keeps one tree per partition and moves the join to an explicit boundary: compile the query into segments, connect them with an exchange over the logical series key, and let each segment hold only the state its own partition owns. `FusedSeriesExec` becomes one segment rather than the whole plan. Written down because it is a design review artifact: the first version is deliberately small (one exchange, two segments, a node whitelist) and the parts that are easy to get wrong - piece lifetime against logical-series lifetime, the completion protocol, what a segment boundary carries - are stated rather than left to the implementer. Signed-off-by: discord9 <55937128+discord9@users.noreply.github.com>