Affects Version/s: 1.13.0
Fix Version/s: None
Component/s: Storage - JSON
AFFECTED_FUNCTIONALITY: ORDER BY, DESC
ISSUE_DESCRIPTION: 'ORDER BY/DESC' clause behaves in different ways when sorting columns containing NaN values. In one case it considers NaN to be the largest value, in another - the smallest one.
- Select from the attached test file (orderBy.json, attached)
- Check the attached screen shot (orderByIssue.jpg):
EXPECTED_RESULT: It was expected the 'ORDER BY' clause to sort attr4 columns data in the same way (most probably NaN should be the largest, see NB)
ACTUAL_RESULT: attr4 column's values were sorted in different ways: for 'obj1'/'obj3' NaN is the largest, for 'obj2'/'obj4' NaN is the smallest.
NB: Postgres as well as Java's sorting (Collection.sort() / Arrays.sort() methods) treats NaN as the largest value