geode-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From YehEmily <...@git.apache.org>
Subject [GitHub] geode pull request #580: GEODE-2936: Refactoring OrderByComparator
Date Wed, 14 Jun 2017 20:28:03 GMT
Github user YehEmily commented on a diff in the pull request:

    https://github.com/apache/geode/pull/580#discussion_r122055572
  
    --- Diff: geode-core/src/main/java/org/apache/geode/cache/query/internal/OrderByComparator.java
---
    @@ -45,78 +44,50 @@ public OrderByComparator(List<CompiledSortCriterion> orderByAttrs,
ObjectType ob
       }
     
       /**
    -   * Yogesh : This methods evaluates sort criteria and returns a ArrayList of Object[]
arrays of
    -   * evaluated criteria
    +   * This method evaluates sort criteria and returns an ArrayList of Object[] arrays
of the
    +   * evaluated criteria.
        * 
    -   * @param value
    -   * @return Object[]
    +   * @param value the criteria to be evaluated.
    +   * @return an Object array of Object arrays of the evaluated criteria.
        */
       protected Object[] evaluateSortCriteria(Object value) {
    -
         CompiledSortCriterion csc;
         Object[] array = null;
         if (orderByAttrs != null) {
           array = new Object[orderByAttrs.size()];
    -      Iterator orderiter = orderByAttrs.iterator();
    +      Iterator orderIter = orderByAttrs.iterator();
           int i = 0;
    -      while (orderiter.hasNext()) {
    -        csc = (CompiledSortCriterion) orderiter.next();
    -        Object[] arr = new Object[2];
    -        arr[0] = csc.evaluate(value, context);
    -        arr[1] = Boolean.valueOf(csc.getCriterion());
    +      while (orderIter.hasNext()) {
    --- End diff --
    
    Fixed, and updating the PR now - thank you!


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message