thomasrebele commented on PR #6889:
URL: https://github.com/apache/hive/pull/6889#issuecomment-6218106537

   Thank you for the suggestion of the `RelOptPlanner#prune` API. I had a look 
at the callers of `RelOptPlanner#prune` in the Calcite project. It looks to me 
that the `prune` function is used to stop applying rules to the old RelNode if 
the transformed RelNode is clearly better (as indicated by a few occurrences of 
the comment `// New plan is absolutely better than old plan.`). I couldn't find 
an example where the `prune` function was called with the result of the rule.
   
   Furthermore, it seems that the `prune` function is only implemented for the 
VolcanoPlanner. The HepPlanner does not provide its own implementation and 
falls back to the one of AbstractRelOptPlanner, which is a 
[no-op](https://github.com/apache/calcite/blob/b6f362cab9e5264a32a13eed535f69bf2436f96c/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java#L244).
 It seems that the RelOptPlanner#prune API is not ready for the scenario of 
HIVE-28427.


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to