xndai commented on a change in pull request #1860: [CALCITE-2970] Add 
abstractConverter only between derived and required traitset
URL: https://github.com/apache/calcite/pull/1860#discussion_r404422213
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/Sort.java
 ##########
 @@ -157,6 +157,11 @@ public RelNode accept(RexShuttle shuttle) {
     return copy(traitSet, getInput(), collation, offset, fetch);
   }
 
+  @Override public boolean isEnforcer() {
+    return offset == null && fetch == null
 
 Review comment:
   This is the definition from you - "As an enforcer, the operator must be 
created only when required traitSet is not satisfied by its input." So it 
sounds to me that only the caller (a RelOptRule or the framework) who creates 
the RelNode would know if the RelNode is a converter or not. If this 
information is not passed into the RelNode, how can we just derive this 
information from RelNode itself? In this particular case, if Sort is used in 
ORDER BY ... LIMIT ... scenario, it's still an enforcer. No?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to