Skip to content

Commit

Permalink
[native] Remove const specifier from hasNext in ShuffleReader
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjialiang committed Dec 22, 2022
1 parent bb3794d commit e258434
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ void LocalPersistentShuffle::noMoreData(bool success) {
readyToRead->close();
}

bool LocalPersistentShuffle::hasNext(int32_t partition) const {
bool LocalPersistentShuffle::hasNext(int32_t partition) {
while (!readyForRead()) {
// This sleep is only for testing purposes.
// For the test cases in which the shuffle reader tasks run before shuffle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class LocalPersistentShuffle : public ShuffleReader, public ShuffleWriter {

void noMoreData(bool success) override;

bool hasNext(int32_t partition) const override;
bool hasNext(int32_t partition) override;

velox::BufferPtr next(int32_t partition, bool success) override;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ShuffleReader {

/// Check by the reader to see if more blocks are available for this
/// partition.
virtual bool hasNext(int32_t partition) const = 0;
virtual bool hasNext(int32_t partition) = 0;

/// Read the next block of data for this partition.
/// @param success set to false to indicate aborted client.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ class TestShuffle : public ShuffleReader, public ShuffleWriter {
}
}

bool hasNext(int32_t partition) const {
bool hasNext(int32_t partition) {
return !readyPartitions_[partition].empty();
}

Expand Down

0 comments on commit e258434

Please sign in to comment.