Skip to content

Commit

Permalink
Updated to override the transformIterator to avoid failures when filt…
Browse files Browse the repository at this point in the history
…ered (#2101)

* Updated to override the transformIterator to avoid failures when filtered
  • Loading branch information
ivakegg authored and hgklohr committed Sep 27, 2023
1 parent 8370661 commit 4cb5867
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@

import datawave.webservice.query.Query;
import datawave.webservice.query.configuration.GenericQueryConfiguration;
import datawave.webservice.query.iterator.DatawaveTransformIterator;
import datawave.webservice.query.logic.DelegatingQueryLogic;
import datawave.webservice.query.logic.QueryLogic;
import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.security.Authorizations;
import org.apache.commons.collections4.iterators.TransformIterator;

import java.util.Collections;
import java.util.Iterator;
Expand Down Expand Up @@ -87,4 +89,13 @@ public Iterator<Object> iterator() {
public Object clone() throws CloneNotSupportedException {
return new FilteredQueryLogic(this);
}

@Override
public TransformIterator getTransformIterator(Query settings) {
if (!filtered) {
return super.getTransformIterator(settings);
} else {
return new DatawaveTransformIterator(iterator());
}
}
}

0 comments on commit 4cb5867

Please sign in to comment.