Skip to content

Commit

Permalink
this is probably a bad idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Luke-Sikina committed Jul 20, 2023
1 parent 39f2320 commit a13e46d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@

import edu.harvard.hms.dbmi.avillach.hpds.data.query.Filter.DoubleFilter;
import edu.harvard.hms.dbmi.avillach.hpds.data.query.Filter.FloatFilter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class Query {

private static final Logger log = LoggerFactory.getLogger(Query.class);

public Query() {

}
Expand Down Expand Up @@ -180,7 +184,7 @@ public String toString() {
break;
default:
//no logic here; all enum values should be present above
System.out.println("Formatting not supported for type " + expectedResultType);
log.warn("Formatting not supported for type {}", expectedResultType);
}

writePartFormat("Required Fields", requiredFields, builder, false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ public String[] getHeaderRow(Query query) {
public void runQuery(Query query, AsyncResult result) {
TreeSet<Integer> idList = abstractProcessor.getPatientSubsetForQuery(query);
log.info("Processing " + idList.size() + " rows for result " + result.id);
for(List<Integer> list : Lists.partition(new ArrayList<>(idList), ID_BATCH_SIZE)){
result.stream.appendResultStore(buildResult(result, query, new TreeSet<Integer>(list)));
};
Lists.partition(new ArrayList<>(idList), ID_BATCH_SIZE).parallelStream()
.map(list -> buildResult(result, query, new TreeSet<Integer>(list)))
.forEach(result.stream::appendResultStore);
}


Expand Down

0 comments on commit a13e46d

Please sign in to comment.