// materialize result to avoid having more than one result set open at the same time
return new CloseableIteratorIteration<BindingSet, SQLException>(Iterations.asList(it).iterator());
} catch (InterruptedException | CancellationException e) {
log.info("SPARQL query execution cancelled");
queryFuture.cancel(true);
queryStatement.cancel();
queryStatement.close();
throw new InterruptedException("SPARQL query execution cancelled");
} catch (ExecutionException e) {
log.error("error executing SPARQL query",e.getCause());