DDC-2934 Added support for function declarations in order by.