rubenada commented on code in PR #3418:
URL: https://github.com/apache/calcite/pull/3418#discussion_r1329887547


##########
core/src/main/java/org/apache/calcite/rel/rules/CoreRules.java:
##########
@@ -715,6 +715,11 @@ private CoreRules() {}
   public static final SortRemoveConstantKeysRule SORT_REMOVE_CONSTANT_KEYS =
       SortRemoveConstantKeysRule.Config.DEFAULT.toRule();
 
+  /** Rule that removes redundant {@link Sort} if its input max row number
+   * is less than or equal one. */
+  public static final RemoveRedundantSort REMOVE_REDUNDANT_SORT =

Review Comment:
   We already have SortRemoveRule (removes a Sort if its input is already 
sorted) and SortRemoveConstantKeysRule (removes keys from Sort if that are 
constant, or removes the entire Sort if all keys are constant).
   To be consistent, I think the new rule should keep this "name pattern". What 
about something along the lines "SortRemoveSingleRowRule", or something like 
that?
   



-- 
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]

Reply via email to