[
https://issues.apache.org/jira/browse/HIVE-25816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stamatis Zampetakis resolved HIVE-25816.
----------------------------------------
Fix Version/s: 4.0.0
Resolution: Fixed
Fixed in
[9087fa93cd785223f4f2552ec836e7580c78830a|https://github.com/apache/hive/commit/9087fa93cd785223f4f2552ec836e7580c78830a].
Thanks for the review [~kkasa] !
> Log CBO plan after rule application for debugging purposes
> ----------------------------------------------------------
>
> Key: HIVE-25816
> URL: https://issues.apache.org/jira/browse/HIVE-25816
> Project: Hive
> Issue Type: Task
> Components: CBO
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Fix For: 4.0.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> In many cases, we want to identify which rule lead to a certain
> transformation in the plan or need to observe how the query plan evolves by
> applying some rules in order to fix some bug or find the right place to
> introduce another optimization step.
> Currently there are some logs during the application of a rule triggered by
> the
> [HepPlanner|https://github.com/apache/calcite/blob/e04f3b08dcfb6910ff4df3810772c346b25ed424/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java#L367]
> and
> [VolcanoPlanner|https://github.com/apache/calcite/blob/e04f3b08dcfb6910ff4df3810772c346b25ed424/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoRuleCall.java#L126]
> but they more or less display only the top operator of the transformation
> and not the whole subtree.
> It would help if instead of displaying only the top operator we logged the
> equivalent of {{EXPLAIN CBO}} on the transformed sub-tree.
> The change is going to be introduced soon by default in Calcite
> (CALCITE-4704) but till we update to that version it would help to have this
> functionality already in Hive.
> For more examples about the proposed change have a look in CALCITE-4704.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)