Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class LocalShuffleSerializedPage : public ShuffleSerializedPage {
velox::BufferPtr buffer)
: rows_{std::move(rows)}, buffer_{std::move(buffer)} {}

const std::vector<std::string_view>& rows() override {
const std::vector<std::string_view>& rows(int32_t /*driverId*/) override {
return rows_;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,14 @@ class ShuffleSerializedPage : public velox::exec::SerializedPageBase {
VELOX_UNSUPPORTED();
}

virtual const std::vector<std::string_view>& rows() = 0;
/// Legacy single-consumer path that delegates to rows(0)..
/// retained for backward compatibility.
virtual const std::vector<std::string_view>& rows() {
return rows(0);
}

/// @param driverId Driver ID for per-consumer checksum tracking.
virtual const std::vector<std::string_view>& rows(int32_t driverId) = 0;
};

class ShuffleReader {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,10 @@ RowVectorPtr ShuffleRead::getOutput() {
numRows += pageRows;
}
rows_.reserve(numRows);
const int32_t driverId = operatorCtx()->driverCtx()->driverId;
for (const auto& page : currentPages_) {
auto* batch = checkedPointerCast<ShuffleSerializedPage>(page.get());
const auto& rows = batch->rows();
const auto& rows = batch->rows(driverId);
for (const auto& row : rows) {
rows_.emplace_back(row);
}
Expand Down
Loading