ydb-platform / ydb

YDB is an open source Distributed SQL Database that combines high availability and scalability with strong consistency and ACID transactions
https://ydb.tech
Apache License 2.0
4.01k stars 567 forks source link

Canonize tree branch order (Grace Joins etc) #2168

Open Hor911 opened 8 months ago

Hor911 commented 8 months ago

In plan tree view some branched (i.e. Grace Join inputs) are fully equivalent. Currently they are printed in random order, so the same plane can be rendered differently. It complicates plan comparison.

For such branches a "canonical" form with fixed (i.a. alphabetical) order should be implemented.

Some other nodes are already rendered with fixed order, no changes are required there

pavelvelikhov commented 8 months ago

I will need to double check if Grace Join inputs are really equivalent. We don't output them in random order right now, this order is defined by the cost function, and its currently not symmetric