> > The attached patch include all the comment given by Tomas and i > check sql standard about LIMIT and this feature >
Unfortunately, it seems the "limit" regression tests fail for some reason - the output mismatches the expected results for some reason. It seems as if the WITH TIES code affects ordering of the results within the group. See the attached file.
Yes the reason is the order of returned row is not always the same. I remove other columns from the result set to get constant result