I see now that my last example is a complexAgg case and this function is not called in that case. So, how about "select A + B from R1 group by A + B order by ABS(A + B)"? Are we relying on a limitation like "only tags or columns in the ORDER BY (when there is a GROUP BY? or always?)"?