Skip to content

Commit

Permalink
Clean up outdated request and requestDataSizes interface (#9003)
Browse files Browse the repository at this point in the history
Summary: Pull Request resolved: #9003

Reviewed By: xiaoxmeng

Differential Revision: D54495683

fbshipit-source-id: 667797db4f5e800787af9ce0a758df28bb7d7956
  • Loading branch information
Yuhta authored and facebook-github-bot committed Mar 7, 2024
1 parent 96aebe6 commit 1067b4b
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions velox/exec/ExchangeSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,33 +79,14 @@ class ExchangeSource : public std::enable_shared_from_this<ExchangeSource> {
/// already produced or data will take more time to produce.
virtual folly::SemiFuture<Response> request(
uint32_t maxBytes,
std::chrono::microseconds maxWait) {
auto maxWaitSeconds = std::max(1ll, llround(maxWait.count() / 1e6));
return request(maxBytes, maxWaitSeconds);
}
std::chrono::microseconds maxWait) = 0;

/// Ask for available data sizes that can be fetched. Normally should not
/// fetching any actual data (i.e. Response::bytes should be 0). However for
/// backward compatibility (e.g. communicating with coordinator), we allow
/// small data (1MB) to be returned.
virtual folly::SemiFuture<Response> requestDataSizes(
std::chrono::microseconds maxWait) {
auto maxWaitSeconds = std::max(1ll, llround(maxWait.count() / 1e6));
return requestDataSizes(maxWaitSeconds);
}

/// Used in presto_cpp for backward compatibility only, will be removed soon.
virtual folly::SemiFuture<Response> request(
uint32_t maxBytes,
uint32_t maxWaitSeconds) {
VELOX_UNREACHABLE();
}

/// Used in presto_cpp for backward compatibility only, will be removed soon.
virtual folly::SemiFuture<Response> requestDataSizes(
uint32_t maxWaitSeconds) {
VELOX_UNREACHABLE();
}
std::chrono::microseconds maxWait) = 0;

/// Close the exchange source. May be called before all data
/// has been received and processed. This can happen in case
Expand Down

0 comments on commit 1067b4b

Please sign in to comment.