use of org.apache.drill.metastore.mongo.transform.FilterTransformer in project drill by apache.
the class MongoRead method internalExecute.
@Override
protected List<T> internalExecute() {
FilterTransformer filterTransformer = context.transformer().filter();
Bson rowFilter = filterTransformer.combine(filterTransformer.transform(metadataTypes), filterTransformer.transform(filter));
List<Document> documents = Lists.newLinkedList();
context.table().find(rowFilter).forEach(documents::add);
return context.transformer().outputData().columns(columns.stream().map(MetastoreColumn::columnName).collect(Collectors.toList())).documents(documents).execute();
}
Aggregations