Search in sources :

Example 1 with RuntimeFilterPrel

use of org.apache.drill.exec.planner.physical.RuntimeFilterPrel in project drill by apache.

the class RuntimeFilterVisitor method visitScan.

@Override
public Prel visitScan(ScanPrel prel, Void value) throws RuntimeException {
    if (toAddRuntimeFilter.contains(prel)) {
        // Spawn a fresh RuntimeFilterPrel over the previous identified probe side scan node or a runtime filter node.
        Collection<HashJoinPrel> hashJoinPrels = probeSideScan2hj.get(prel);
        RuntimeFilterPrel runtimeFilterPrel = null;
        for (HashJoinPrel hashJoinPrel : hashJoinPrels) {
            long identifier = rfIdCounter.incrementAndGet();
            hashJoinPrel.getRuntimeFilterDef().setRuntimeFilterIdentifier(identifier);
            if (runtimeFilterPrel == null) {
                runtimeFilterPrel = new RuntimeFilterPrel(prel, identifier);
            } else {
                runtimeFilterPrel = new RuntimeFilterPrel(runtimeFilterPrel, identifier);
            }
        }
        return runtimeFilterPrel;
    } else {
        return prel;
    }
}
Also used : HashJoinPrel(org.apache.drill.exec.planner.physical.HashJoinPrel) RuntimeFilterPrel(org.apache.drill.exec.planner.physical.RuntimeFilterPrel)

Aggregations

HashJoinPrel (org.apache.drill.exec.planner.physical.HashJoinPrel)1 RuntimeFilterPrel (org.apache.drill.exec.planner.physical.RuntimeFilterPrel)1