问题
In Calcite, after optimization provided by the default VolcanoPlanner, we can get an optimized RelNode, but can we have a further optimization? For example I want to add an ElasticsearchSort
or something like that to limit the dataset we handle.
Someone suggests we can define a RelOptRule, but since VolcanoPlanner handles the optimization in dynamic programming
way, not sure if the rule can be applied in the right order. Any ideas?
回答1:
You don't have to use VolcanoPlanner. There's also HepPlanner which just applies the rules that you give it as a HepProgram.
来源:https://stackoverflow.com/questions/60537311/calcite-can-we-rewrite-the-optimized-relnode