Search in sources :

Example 1 with PluginLimitRel

use of org.apache.drill.exec.store.plan.rel.PluginLimitRel in project drill by apache.

the class PluginLimitRule method convert.

@Override
public RelNode convert(RelNode rel) {
    DrillLimitRelBase limit = (DrillLimitRelBase) rel;
    PluginLimitRel pluginLimitRel = getPluginLimitRel(limit);
    if (getPluginImplementor().artificialLimit()) {
        // preserve original limit
        return limit.copy(limit.getTraitSet(), Collections.singletonList(pluginLimitRel));
    } else {
        return pluginLimitRel;
    }
}
Also used : DrillLimitRelBase(org.apache.drill.exec.planner.common.DrillLimitRelBase) PluginLimitRel(org.apache.drill.exec.store.plan.rel.PluginLimitRel)

Aggregations

DrillLimitRelBase (org.apache.drill.exec.planner.common.DrillLimitRelBase)1 PluginLimitRel (org.apache.drill.exec.store.plan.rel.PluginLimitRel)1