a-rafay commented on a change in pull request #2211:
URL: https://github.com/apache/calcite/pull/2211#discussion_r527314255



##########
File path: core/src/test/java/org/apache/calcite/test/SqlToRelTestBase.java
##########
@@ -263,6 +263,11 @@ Tester withCatalogReaderFactory(
 
     /** Returns a tester that uses a given context. */
     Tester withContext(UnaryOperator<Context> transform);
+
+    /** Trims a RelNode. */
+    default RelNode trimRelNode(RelNode relNode) {
+      return relNode;

Review comment:
       I didn't find a method in the Tester to only trim the node. I see 
convertSqlToRel(..) trims the query if we enable trimming. I copied the code 
from there and put it together as a separate method because i needed to use the 
trimming part of that function but not conversion from SQL to Rel.
   If you think there is a better place to do this, i would be happy to 
refactor, or if we already have code doing this, i can reuse that.
   I will remove the default behavior of this method, since we only have 1 
implementation of Tester at the moment.




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


Reply via email to