misc: Remove unused includes#27026
Merged
amitkdutta merged 1 commit intoprestodb:masterfrom Jan 24, 2026
Merged
Conversation
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.
Differential Revision: D91374441
Contributor
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR removes unused header includes in several presto_cpp/main translation units and narrows one dependency from a heavy umbrella header to a specific protocol header, reducing compilation dependencies and potential build times without changing runtime behavior. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
gggrace14
approved these changes
Jan 24, 2026
This was referenced Mar 31, 2026
15 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Clean up unused includes in presto_cpp/main to improve compilation times
and reduce unnecessary header dependencies:
Announcer.cpp:
folly/futures/Retrying.h- no retrying symbols usedvelox/common/memory/Memory.h- no memory pool symbols usedPeriodicHeartbeatManager.cpp:
velox/common/memory/Memory.h- no memory symbols usedPrestoExchangeSource.cpp:
QueryContextManager.hwith the more specificpresto_protocol/core/presto_protocol_core.hwhich directly providesthe 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: