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;
}
}
Aggregations