Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Sep 10, 2024
1 parent d3143f8 commit fadae59
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,15 @@ public RecordsWithSplitIds<List> fetch() throws IOException {
}

private void checkSplitOrStartNext() throws IOException, DorisException {
if (valueReader != null) {
if (valueReader != null && valueReader.hasNext()) {
return;
}
final DorisSourceSplit nextSplit = splits.poll();
if (nextSplit == null) {
throw new IOException("Cannot fetch from another split - no split remaining");
}
currentSplitId = nextSplit.splitId();
LOG.info("currentSplitId {}, split {}", currentSplitId, nextSplit);
valueReader =
ValueReader.createReader(
nextSplit.getPartitionDefinition(), options, readOptions, LOG);
Expand Down

0 comments on commit fadae59

Please sign in to comment.