You need to first investigate whether the transformation rules or operators are 
correctly implemented or not. Typically there is a bug if you see the planner 
fails to terminate.

There is cancelFlag variable and checkCancel() method in VolcanoPlanner.
You can pass your own CancelFlag implementation to Context when constructing 
planner [1] so that you can interrupt the planning when it times out or the 
cost the greater or lower than some threshold.

[1] 
https://github.com/apache/calcite/blob/e2f949d5d6cff79cbe8565bc3e85f437dee9fd7e/core/src/main/java/org/apache/calcite/plan/AbstractRelOptPlanner.java#L102

On 2022/08/26 20:29:15 Pranav Deshpande wrote:
> Dear Apache Calcite Dev Team,
> Sometimes my volcano planner fails to terminate because there are many
> plans to search for (millions of them).
> 
> Is there a way to prune the search if a specific amount of time has elapsed
> or if the same net cost is obtained for the Xth time, etc.
> 
> Requesting the community's guidance on this.
> 
> Thanks & Regards,
> Pranav
> 

Reply via email to