wirybeaver commented on code in PR #16204:
URL: https://github.com/apache/pinot/pull/16204#discussion_r2167832627


##########
pinot-query-planner/src/main/java/org/apache/pinot/query/planner/physical/v2/mapping/PinotDistMapping.java:
##########
@@ -90,6 +93,13 @@ public static RelCollation apply(RelCollation relCollation, 
PinotDistMapping map
     return RelCollations.of(newFieldCollations);

Review Comment:
   have a question. Is it intentionally to select the newFieldIndices.get(0)? 
   ```
     public static RelCollation apply(RelCollation relCollation, 
PinotDistMapping mapping) {
       if (relCollation.getKeys().isEmpty()) {
         return relCollation;
       }
       List<RelFieldCollation> newFieldCollations = new ArrayList<>();
       for (RelFieldCollation fieldCollation : 
relCollation.getFieldCollations()) {
         List<Integer> newFieldIndices = 
mapping.getTargets(fieldCollation.getFieldIndex());
         if (CollectionUtils.isEmpty(newFieldIndices)) {
           break;
         }
         
newFieldCollations.add(fieldCollation.withFieldIndex(newFieldIndices.get(0)));
       }
       return RelCollations.of(newFieldCollations);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to