Throw proper exception when memory size exceeded in TopN
Verify that types of ORDER BY expressions are orderable