Re: Fix up grouping sets reorder

2019-06-30 Thread Andrew Gierth
> "Richard" == Richard Guo writes: Richard> Hi all, Richard> During the reorder of grouping sets into correct prefix order, Richard> if only one aggregation pass is needed, we follow the order of Richard> the ORDER BY clause to the extent possible, to minimize the Richard> chance that w

Re: Fix up grouping sets reorder

2019-06-17 Thread Andrew Gierth
> "Andres" == Andres Freund writes: >> During the reorder of grouping sets into correct prefix order, if >> only one aggregation pass is needed, we follow the order of the >> ORDER BY clause to the extent possible, to minimize the chance that >> we add unnecessary sorts. This is implement

Re: Fix up grouping sets reorder

2019-06-17 Thread Andres Freund
Hi, On 2019-06-17 17:23:11 +0800, Richard Guo wrote: > During the reorder of grouping sets into correct prefix order, if only > one aggregation pass is needed, we follow the order of the ORDER BY > clause to the extent possible, to minimize the chance that we add > unnecessary sorts. This is imple