> On 3 Jul 2018, at 12:24, Masahiko Sawada <sawada.m...@gmail.com> wrote:

> Thank you for updating the patch.

Thanks for reviewing!

> Hmm, this is missing the eqop fields of SortGroupClause. I haven't
> tested yet but does the similar degradation happen if two
> SortGroupCaluses have different eqop and the same other values?

I wasn’t able to construct a case showing this, but I also think you’re right.
Do you have an idea of a query that can trigger a regression?  The attached
patch adds a stab at this, but I’m not sure if it’s the right approach.

> The source code comments for common_prefix_cmp() function and
> WindowClauseSortNode struct is needed.

Fixed.

> +  from empsalary;
> 
> I think it's better to change "from empsalary" to "FROM empsalary" for
> consistency with other code.

Yes, that was a silly oversight. Fixed.

cheers ./daniel

Attachment: window_prefix_sort-v5.patch
Description: Binary data

Reply via email to