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?