Github user PurelyApplied commented on a diff in the pull request: https://github.com/apache/geode/pull/591#discussion_r122848553 --- Diff: geode-core/src/main/java/org/apache/geode/cache/query/internal/OrderByComparatorMapped.java --- @@ -58,30 +55,33 @@ public int evaluateSortCriteria(Object obj1, Object obj2) { int result = -1; Object[] list1 = this.evaluateSortCriteria(obj1); Object[] list2 = this.evaluateSortCriteria(obj2); - if (list1.length != list2.length) { Support.assertionFailed("Error Occurred due to improper sort criteria evaluation "); } else { for (int i = 0; i < list1.length; i++) { Object arr1[] = (Object[]) list1[i]; Object arr2[] = (Object[]) list2[i]; - // check for null. + + // check for null if (arr1[0] == null || arr2[0] == null) { --- End diff -- I'd like to see this logic squashed as long as you're in here. Chasing `if (arr1[0] == null || ...)` immediately by a `arr1[0] == null` is begging to be simplified. Ditto that in the subsequent `else if` blocks.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---