Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
marin-ma committed Sep 5, 2024
1 parent e34ce56 commit 89b902c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cpp/velox/shuffle/VeloxShuffleReader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,12 @@ std::shared_ptr<ColumnarBatch> VeloxSortShuffleReaderDeserializer::next() {
cachedInputs_.emplace_back(numRows, wrapInBufferViewAsOwner(buffer->data(), buffer->size(), buffer));
cachedRows_ += numRows;
} else {
// For a large row, read all segments.
// numRows = 0 indicates a segment of a large row.
std::vector<std::shared_ptr<arrow::Buffer>> buffers;
auto rowSize = *reinterpret_cast<RowSizeType*>(const_cast<uint8_t*>(arrowBuffers[0]->data()));
RowSizeType bufferSize = arrowBuffers[0]->size();
buffers.emplace_back(std::move(arrowBuffers[0]));
// Read remaining segments.
while (bufferSize < rowSize) {
GLUTEN_ASSIGN_OR_THROW(
arrowBuffers, BlockPayload::deserialize(in_.get(), codec_, arrowPool_, numRows, decompressTime_));
Expand Down
2 changes: 1 addition & 1 deletion cpp/velox/shuffle/VeloxSortShuffleWriter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ arrow::Status VeloxSortShuffleWriter::evictAllPartitions() {
}

arrow::Status VeloxSortShuffleWriter::evictPartition(uint32_t partitionId, size_t begin, size_t end) {
VELOX_CHECK(begin < end);
VELOX_DCHECK(begin < end);
// Count copy row time into sortTime_.
Timer sortTime{};
// Serialize [begin, end)
Expand Down

0 comments on commit 89b902c

Please sign in to comment.