kgyrtkirk commented on a change in pull request #1879: [CALCITE-3880] Add 
SortExchange support to RelFieldTrimmer
URL: https://github.com/apache/calcite/pull/1879#discussion_r400237103
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/RelDistributions.java
 ##########
 @@ -137,7 +137,7 @@ public RelDistribution apply(Mappings.TargetMapping 
mapping) {
       return getTraitDef().canonize(
           new RelDistributionImpl(type,
               ImmutableIntList.copyOf(
-                  Mappings.apply((Mapping) mapping, keys))));
 
 Review comment:
   why is this change needed? `apply` and `apply2` seems to be different :
   * `apply` reorders `list` elements according to `mapping`
   ** `outList[k]=inList[mappingS[k]]`
   * while `apply2` returns the mapping target(s) according to the list
   ** `outList[k]=mappingT[inList[k]]`
   
   I would feel that in this case `apply` is the right one to use here - why 
it's not?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to