Skip to content

Commit

Permalink
One more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
rcaudy committed Nov 14, 2023
1 parent 43c199c commit c12705f
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@ public DynamicWhereFilter(final QueryTable setTable, final boolean inclusion, fi
if (setRefreshing) {
this.setTable = setTable;
setTupleSource = TupleSourceFactory.makeTupleSource(setColumns);
try (final CloseableIterator<?> initialKeysIterator = ChunkedColumnIterator.make(
setTupleSource, setTable.getRowSet(), getChunkSize(setTable.getRowSet()))) {
initialKeysIterator.forEachRemaining(this::addKey);
if (setTable.getRowSet().isNonempty()) {
try (final CloseableIterator<?> initialKeysIterator = ChunkedColumnIterator.make(
setTupleSource, setTable.getRowSet(), getChunkSize(setTable.getRowSet()))) {
initialKeysIterator.forEachRemaining(this::addKey);
}
}

final String[] setColumnNames =
Expand Down Expand Up @@ -168,10 +170,12 @@ public void onFailureInternal(Throwable originalException, Entry sourceEntry) {
} else {
this.setTable = null;
setTupleSource = null;
final TupleSource<?> temporaryTupleSource = TupleSourceFactory.makeTupleSource(setColumns);
try (final CloseableIterator<?> initialKeysIterator = ChunkedColumnIterator.make(
temporaryTupleSource, setTable.getRowSet(), getChunkSize(setTable.getRowSet()))) {
initialKeysIterator.forEachRemaining(this::addKeyUnchecked);
if (setTable.getRowSet().isNonempty()) {
final TupleSource<?> temporaryTupleSource = TupleSourceFactory.makeTupleSource(setColumns);
try (final CloseableIterator<?> initialKeysIterator = ChunkedColumnIterator.make(
temporaryTupleSource, setTable.getRowSet(), getChunkSize(setTable.getRowSet()))) {
initialKeysIterator.forEachRemaining(this::addKeyUnchecked);
}
}
kernelValid = liveValuesArrayValid = false;
setInclusionKernel = null;
Expand Down

0 comments on commit c12705f

Please sign in to comment.