use of io.crate.planner.optimizer.rule.OptimizeCollectWhereClauseAccess in project crate by crate.
the class CopyToPlan method optimizeCollect.
private static LogicalPlan optimizeCollect(PlannerContext context, TableStats tableStats, LogicalPlan collect) {
OptimizeCollectWhereClauseAccess rewriteCollectToGet = new OptimizeCollectWhereClauseAccess();
Match<Collect> match = rewriteCollectToGet.pattern().accept(collect, Captures.empty());
if (match.isPresent()) {
LogicalPlan plan = rewriteCollectToGet.apply(match.value(), match.captures(), tableStats, context.transactionContext(), context.nodeContext());
return plan == null ? collect : plan;
}
return collect;
}
Aggregations