use of io.crate.operation.InputRow in project crate by crate.
the class SingleRowSource method getCollector.
@Override
public CrateCollector getCollector(CollectPhase phase, BatchConsumer consumer, JobCollectContext jobCollectContext) {
RoutedCollectPhase collectPhase = (RoutedCollectPhase) phase;
collectPhase = collectPhase.normalize(clusterNormalizer, null);
if (collectPhase.whereClause().noMatch()) {
return RowsCollector.empty(consumer);
}
assert !collectPhase.whereClause().hasQuery() : "WhereClause should have been normalized to either MATCH_ALL or NO_MATCH";
InputFactory inputFactory = new InputFactory(functions);
InputFactory.Context<CollectExpression<Row, ?>> ctx = inputFactory.ctxForInputColumns(collectPhase.toCollect());
return RowsCollector.single(new InputRow(ctx.topLevelInputs()), consumer);
}
Aggregations