方解石:我们可以重写优化的RelNode吗? [英] Calcite: can we rewrite the optimized RelNode?
问题描述
在方解石中,通过默认VolcanoPlanner提供的优化后,我们可以获得优化的RelNode,但是我们可以进一步优化吗?例如,我想添加ElasticsearchSort
或类似的东西来限制我们处理的数据集.
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.
有人建议我们可以定义一个RelOptRule,但是由于VolcanoPlanner以dynamic programming
方式处理优化,因此不确定是否可以正确的顺序应用规则.有什么想法吗?
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?
推荐答案
您不必使用VolcanoPlanner.还有HepPlanner,它只应用您给它提供的作为HepProgram的规则.
You don't have to use VolcanoPlanner. There's also HepPlanner which just applies the rules that you give it as a HepProgram.
这篇关于方解石:我们可以重写优化的RelNode吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!