Fix use of function in OrderBy

This commit adds support for functions (like CONCAT()) in OrderBy.