File tree Expand file tree Collapse file tree 2 files changed +10
-5
lines changed
presto-native-execution/presto_cpp/main/operators Expand file tree Collapse file tree 2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -31,11 +31,12 @@ namespace facebook::presto::operators {
3131
3232folly::SemiFuture<ShuffleExchangeSource::Response>
3333ShuffleExchangeSource::request (
34- uint32_t /* maxBytes*/ ,
34+ uint32_t maxBytes,
3535 std::chrono::microseconds /* maxWait*/ ) {
36- auto nextBatch = [this ]() {
37- return std::move (shuffleReader_->next (1 ))
38- .deferValue ([this ](std::vector<std::unique_ptr<ReadBatch>>&& batches) {
36+ auto nextBatch = [this , maxBytes]() {
37+ return std::move (shuffleReader_->next (maxBytes))
38+ .deferValue ([this , maxBytes](std::vector<std::unique_ptr<ReadBatch>>&& batches) {
39+ LOG (ERROR) << " batch size: " << batches.size () << " maxBytes: " << velox::succinctBytes (maxBytes);
3940 std::vector<velox::ContinuePromise> promises;
4041 int64_t totalBytes{0 };
4142 {
Original file line number Diff line number Diff line change @@ -56,8 +56,12 @@ class ShuffleReader {
5656 public:
5757 virtual ~ShuffleReader () = default ;
5858
59+ // / Fetch the next batch of rows from the shuffle reader.
60+ // / @param bytes Maximum number of bytes to read in this batch.
61+ // / @return A semi-future resolving to a vector of ReadBatch pointers, where
62+ // / each ReadBatch contains rows and associated data buffers.
5963 virtual folly::SemiFuture<std::vector<std::unique_ptr<ReadBatch>>> next (
60- size_t numBatches ) = 0;
64+ uint64_t maxBytes ) = 0;
6165
6266 // / Tell the shuffle system the reader is done. May be called with 'success'
6367 // / true before reading all the data. This happens when a query has a LIMIT or
You can’t perform that action at this time.
0 commit comments