AMBARI-8556. Sorting by non-string values is broken (onechiporenko)