Skip to content

Commit

Permalink
Merge pull request #1967 from kuzudb/fix-asan
Browse files Browse the repository at this point in the history
Fix asan
  • Loading branch information
ray6080 committed Aug 28, 2023
2 parents 8174d25 + 8664576 commit feabe82
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 118 deletions.
114 changes: 0 additions & 114 deletions src/include/storage/copier/read_file_state.h

This file was deleted.

7 changes: 3 additions & 4 deletions src/storage/copier/reader_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,14 +237,13 @@ std::unique_ptr<ReaderMorsel> ReaderSharedState::getParallelMorsel() {
}

std::unique_ptr<ReaderMorsel> ReaderSharedState::getMorselOfNextBlock() {
if (currFileIdx >= blockInfos.size()) {
return std::make_unique<ReaderMorsel>(currFileIdx, INVALID_BLOCK_IDX, INVALID_ROW_IDX);
}
auto numBlocksInFile = blockInfos[currFileIdx].numRowsPerBlock.size();
if (currBlockIdx >= numBlocksInFile) {
currFileIdx += fileType == CopyDescription::FileType::NPY ? filePaths.size() : 1;
currBlockIdx = 0;
if (currFileIdx >= filePaths.size()) {
// End of all files.
return std::make_unique<ReaderMorsel>();
}
}
return std::make_unique<ReaderMorsel>(currFileIdx, currBlockIdx++, currRowIdx);
}
Expand Down

0 comments on commit feabe82

Please sign in to comment.