use of org.apache.drill.exec.store.mongo.MongoScanSpec in project drill by apache.
the class MongoPluginImplementor method getPhysicalOperator.
@Override
public GroupScan getPhysicalOperator() {
MongoScanSpec scanSpec = groupScan.getScanSpec();
List<String> operations = this.operations.stream().map(op -> op.toBsonDocument().toJson()).collect(Collectors.toList());
String filters = Optional.ofNullable(this.filters).map(Document::toJson).orElse(null);
MongoScanSpec newSpec = new MongoScanSpec(scanSpec.getDbName(), scanSpec.getCollectionName(), filters, operations);
return new MongoGroupScan(groupScan.getUserName(), groupScan.getStoragePlugin(), newSpec, columns, runAggregate);
}
Aggregations