方解石:我们可以重写优化的RelNode吗? [英] Calcite: can we rewrite the optimized RelNode?

查看:188
本文介绍了方解石:我们可以重写优化的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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆