fix: bucket discovery for local motions
Previously, during bucket discovery, we used Buckets::Any for
Motion(Local) nodes. This caused DML queries to be executed on all
nodes instead of targeting specific bucket children. We now apply
Motion(Local) only in the following cases:
- update/delete. When materializing the reading subtree for DML
operations, Buckets::Any was used, but the reason for this is
unclear.
- union all between sharded and local tables. To prevent duplicates,
we materialize the global subtree only on a single storage node.
Consequently, the subtree with Motion(Local) must have the same
buckets as its child (the child node will always have Buckets::Any).
Co-authored-by:
Arseniy Volynets <a.volynets@picodata.io>
Please register or sign in to comment