geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-3073) Refactor/rename OrderByComparatorUnmapped
Date Mon, 19 Jun 2017 23:28:00 GMT

    [ https://issues.apache.org/jira/browse/GEODE-3073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16054936#comment-16054936
] 

ASF GitHub Bot commented on GEODE-3073:
---------------------------------------

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.


> Refactor/rename OrderByComparatorUnmapped
> -----------------------------------------
>
>                 Key: GEODE-3073
>                 URL: https://issues.apache.org/jira/browse/GEODE-3073
>             Project: Geode
>          Issue Type: Improvement
>          Components: querying
>            Reporter: Emily Yeh
>            Assignee: Emily Yeh
>
> It would make more sense to rename {{OrderByComparatorUnmapped.java}} to {{OrderByComparatorMapped.java}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message