Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix citusdata#7684 : order "planner" tree
Similar to other bugs affected by citus usage of ruletuils: the provided tree as input is distinct from the tree expected in ruleutils in PostgreSQL. As a consequence, it is required in some places to re-order the tree structure to make it compliant or "back" to the parser tree (before it's rewritten and reordered by PostgreSQL to optimize execution). Or to lookup the target list and ensure it's the one "we expect". Fox this bug, the `get_rule_sortgroupclause()` is used to check if target list entry `resname` is defined, and use it directly if it exists. No benchmark where run, it's not expected to impact a lot.
- Loading branch information