You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2022/06/13 07:33:20 UTC

[GitHub] [calcite] danny0405 commented on a diff in pull request #2829: [CALCITE-5177] Query loses hint after decorrelation

danny0405 commented on code in PR #2829:
URL: https://github.com/apache/calcite/pull/2829#discussion_r895410038


##########
core/src/main/java/org/apache/calcite/sql2rel/RelDecorrelator.java:
##########
@@ -1595,6 +1590,7 @@ static Map<Integer, Integer> identityMap(int count) {
   Frame register(RelNode rel, RelNode newRel,
       Map<Integer, Integer> oldToNewOutputs,
       NavigableMap<CorDef, Integer> corDefOutputs) {
+    newRel = RelOptUtil.copyRelHints(rel, newRel);

Review Comment:
   Thanks for the fix @rubenada , the fix generally makes sense, event though there are redundant copy of hints, the fix avoids some buggy corner cases.
   
   I was thinking, based on the fact that most of the kind of `RelNode` now are `Hintable`, we may need to start considering making the `AbstractRelNode` implement `Hintable` directly. And give some default implementations for some of the nodes.



-- 
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: commits-unsubscribe@calcite.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org