Skip to content

Commit

Permalink
[hotfix] Remove useless RecordReader.forIOEachRemaining
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Sep 3, 2024
1 parent d7c7057 commit db98432
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 54 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import org.apache.paimon.annotation.Public;
import org.apache.paimon.utils.CloseableIterator;
import org.apache.paimon.utils.ConsumerWithIOException;
import org.apache.paimon.utils.Filter;

import javax.annotation.Nullable;
Expand Down Expand Up @@ -164,26 +163,6 @@ default void forEachRemainingWithPosition(BiConsumer<Long, ? super T> action)
}
}

/**
* Performs the given action for each remaining element in {@link RecordReader} until all
* elements have been processed or the action throws an exception.
*/
default void forIOEachRemaining(ConsumerWithIOException<? super T> action) throws IOException {
RecordReader.RecordIterator<T> batch;
T record;

try {
while ((batch = readBatch()) != null) {
while ((record = batch.next()) != null) {
action.accept(record);
}
batch.releaseBatch();
}
} finally {
close();
}
}

/** Returns a {@link RecordReader} that applies {@code function} to each element. */
default <R> RecordReader<R> transform(Function<T, R> function) {
RecordReader<T> thisReader = this;
Expand Down

This file was deleted.

0 comments on commit db98432

Please sign in to comment.