Fail queries that use aggregations in sorting with limit
Merge pull request #1556 from systay/toppipe-aggregate-errors

Fail queries that use aggregations in sorting with limit