Skip to content

Commit c57d320

Browse files
authored
misc: Remove unused includes (#27026)
Summary: Clean up unused includes in presto_cpp/main to improve compilation times and reduce unnecessary header dependencies: 1. Announcer.cpp: - Removed `folly/futures/Retrying.h` - no retrying symbols used - Removed `velox/common/memory/Memory.h` - no memory pool symbols used 2. PeriodicHeartbeatManager.cpp: - Removed `velox/common/memory/Memory.h` - no memory symbols used 3. PrestoExchangeSource.cpp: - Replaced `QueryContextManager.h` with the more specific `presto_protocol/core/presto_protocol_core.h` which directly provides the protocol namespace symbols (DataSize, Duration, PRESTO_*_HEADER constants) that are actually used. This avoids pulling in heavy transitive dependencies from QueryContextManager.h like folly/Synchronized, folly/executors/*, and velox/core/QueryCtx.h. ## Summary by Sourcery Clean up unused and overly broad header dependencies in presto_cpp main sources to reduce compile-time and transitive includes. Enhancements: - Remove unused header includes from Announcer and PeriodicHeartbeatManager to simplify dependencies. - Narrow PrestoExchangeSource's dependency from QueryContextManager to the specific presto_protocol_core header that provides the required protocol types and constants. ``` == NO RELEASE NOTE == ```
1 parent c53e51d commit c57d320

File tree

3 files changed

+1
-4
lines changed

3 files changed

+1
-4
lines changed

presto-native-execution/presto_cpp/main/Announcer.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
#include <boost/lexical_cast.hpp>
1717
#include <boost/uuid/uuid_generators.hpp>
1818
#include <boost/uuid/uuid_io.hpp>
19-
#include <folly/futures/Retrying.h>
20-
#include <velox/common/memory/Memory.h>
2119
#include "presto_cpp/external/json/nlohmann/json.hpp"
2220

2321
namespace facebook::presto {

presto-native-execution/presto_cpp/main/PeriodicHeartbeatManager.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
* limitations under the License.
1313
*/
1414
#include "presto_cpp/main/PeriodicHeartbeatManager.h"
15-
#include <velox/common/memory/Memory.h>
1615

1716
namespace facebook::presto {
1817
PeriodicHeartbeatManager::PeriodicHeartbeatManager(

presto-native-execution/presto_cpp/main/PrestoExchangeSource.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
#include <re2/re2.h>
1919
#include <sstream>
2020

21-
#include "presto_cpp/main/QueryContextManager.h"
2221
#include "presto_cpp/main/common/Counters.h"
22+
#include "presto_cpp/presto_protocol/core/presto_protocol_core.h"
2323
#include "velox/common/base/Exceptions.h"
2424
#include "velox/common/testutil/TestValue.h"
2525

0 commit comments

Comments
 (0)