use of org.apache.calcite.rel.RelHomogeneousShuttle in project hive by apache.
the class CorrelateProjectExtractor method findCorrelationDependentCalls.
/**
* Traverses a plan and finds all simply correlated row expressions with the specified id.
*/
private static Set<RexNode> findCorrelationDependentCalls(CorrelationId corrId, RelNode plan) {
SimpleCorrelationCollector finder = new SimpleCorrelationCollector(corrId);
plan.accept(new RelHomogeneousShuttle() {
@Override
public RelNode visit(RelNode other) {
if (other instanceof Project || other instanceof Filter) {
other.accept(finder);
}
return super.visit(other);
}
});
return finder.correlations;
}
Aggregations