Hi Tom,
Thanks, v2 does it in the planner. Under a nondeterministic collation
a sort key with a non-default opfamily now gets its own
EquivalenceClass, so it is never merged with other keys or clauses.
I also found that GROUP BY x ORDER BY x USING ~<~ is wrong with a
sorted GroupAggregate. It returns 4 groups on the report's table, and
HashAggregate returns 2. Should we fix that in this thread too?
Thank,
Shihao