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


##########
core/src/main/java/org/apache/calcite/plan/RelOptUtil.java:
##########
@@ -475,6 +475,10 @@ public static RelNode copyRelHints(RelNode originalRel, 
RelNode newRel) {
    * or {@code newRel} directly if one of them are not {@link Hintable}
    */
   public static RelNode copyRelHints(RelNode originalRel, RelNode newRel, 
boolean filterHints) {
+    if (originalRel == newRel && !filterHints) {
+      return originalRel;

Review Comment:
   But this is a public method in RelOptUtil, hence a "public API" of Calcite. 
Theoretically, any "Calcite client code" (downstream project) could call this 
method with `filterHint` true.



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