Is there a way to push Sort RelNode collation trait down to its children?
Let say I have the following rel tree
and the goal is to push the collation trait all the way to the Scan node to
transform it to something like that
PhysicalScan with CollationTrait
I have a rule that matches the sort node and transforms it to a result of
its input convert call where the collation trait together with the physical
convention trait is added to the child's trait set.
The rule seems to be firing but the collation trait is not propagated down
- the result of the Logical to Physical Scan conversion rule does not have
If this approach is not possible what could be an alternative? Have various
transpose rules to position the sort rel just above the scan?