Skip to content

[chore](misc) Remove unused code across BE, FE and tests - #70958

Closed
yy782 wants to merge 1 commit into
apache:masterfrom
yy782:refactor/remove-unused-code
Closed

yy782 wants to merge 1 commit into
apache:masterfrom
yy782:refactor/remove-unused-code

Conversation

@yy782

@yy782 yy782 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor

Background

Doris carries code that became unreachable after earlier refactors and feature removals across its BE storage and execution helpers, FE planner and service classes, and test/tool directories. Several of these items were already marked @Deprecated or annotated as "not used any more", but were never removed. Some are write-only fields or private helpers whose only caller was a deprecated overload; others are disabled test files or an unregistered standalone program.

What problem does this PR solve?

Issue Number: None
Related PR: None
PR Type: Refactor

Problem Summary:

Unused fields, methods, and disabled test code across BE, FE, and tools increase code volume, add compilation time, and raise maintenance cost. This change deletes code with proven zero in-repo references, to slim down the codebase, reduce compilation burden, and lower maintenance cost. No reachable behavior, interface, or format changes.

Details

  • Change map: 856 changed lines across 20 files: 5+/313- production code.
  • Moves vs. logic changes: No moves. All edits are deletions of unreferenced declarations, definitions, fields, imports, and whole disabled files.
  • Behavior change: None intended.
  • Compatibility: None changed.
  • Performance impact: None expected. Only unreachable code and unused state are removed.
  • Rollback: A plain revert is safe; nothing persisted or sent between processes is affected.

Testing

Repository-wide static reference searches (search_content and grep) for each removed symbol returned zero references or only unrelated same-named symbols. clang-format --dry-run --Werror --style=file on all touched C++ files passed after realigning the remaining enum comments. build-support/check-build-hygiene.sh passed. Local builds of both the C++ side and the Java side succeeded.

Notes for Reviewers

I am not sure whether cloud/test/sync_point_test.cpp and fe/fe-core/src/test/java/org/apache/doris/common/parquet/ParquetReaderTest.java should be deleted.

Release note

None.

Check List (For Author)

  • Behavior changed: No
  • Does this need documentation: No
  • Pre-submission status: Partially verified: static reference, formatting, and header-hygiene checks done; local build succeeded

AI Disclosure

  • Tool: DeepSeek-V4 Pro
  • Generated: the code deletions, this description, and the supporting static searches
  • Human review: Reviewed by the author

@yy782
yy782 marked this pull request as ready for review November 24, 2026 11:11
@yy782

yy782 commented Nov 24, 2026

Copy link
Copy Markdown
Contributor Author

build all

@yy782
yy782 force-pushed the refactor/remove-unused-code branch from 5d02274 to 3f4ae2f Compare November 25, 2026 15:12
@yy782 yy782 changed the title [refactor](be) Remove unused code across BE, FE and tests [chore](misc) Remove unused code across BE, FE and tests Nov 25, 2026
@yy782 yy782 closed this Nov 28, 2026
@yy782

yy782 commented Nov 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR. I'll switch to cleaning up unused code module by module, rather than sweeping across multiple modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant