[refine](code) remove dead code across core types and utilities #63307
Open
Mryange wants to merge 3 commits into
Open
[refine](code) remove dead code across core types and utilities #63307Mryange wants to merge 3 commits into
Mryange wants to merge 3 commits into
Conversation
…che#62994) This PR cleans up dead code accumulated across BE core files — unused unions, methods, type traits, free functions, forward declarations, and includes that are never referenced in the codebase. Specific removals include: - binary_cast.hpp: 5 unreferenced type-punning unions (TypeConverter, DecimalInt128Union, VecDateTimeInt64Union, DateV2UInt32Union, DateTimeV2UInt64Union) - block.cpp/h: unused columns_bytes() and clone_with_columns() methods, plus stale includes (sys/types.h, iterator, config.h) - string_ref.cpp/h: unused single-char start_with/end_with overloads and the min_string_val/max_string_val/MIN_CHAR/MAX_CHAR scaffolding that served type_limit specializations - type_limit.h: type_limit<StringRef> and type_limit<std::string> specializations that depended on the removed string_ref helpers - number_traits.h: 6 unused type-trait structs (ResultOfAdditionMultiplication, ResultOfSubtraction, ResultOfFloatingPointDivision, ResultOfIntegerDivision, ResultOfModulo, ResultOfBit, BinaryOperatorTraits) and stale includes - column_variant.cpp/h: unused get_last_field() and is_doc_mode() methods - nested_utils.cpp/h: unused extract_table_name() and declaration of validate_array_sizes() - map_value.cpp, struct_value.cpp: entire files deleted — each contained only a single unused shallow_copy method - call_on_type_index.h: stale forward declaration of DataTypeEnum - data_type_array_serde.h: stale forward declaration of JsonWriter - function_array_enumerate_uniq.cpp, cgroup_util.cpp: added missing transitive includes exposed after dead-code removal (column_decimal.h, boost/algorithm/string.hpp) Corresponding tests that exercised only the deleted functions were also removed (block_test.cpp, column_variant_test.cpp, data_type_serde_test.cpp, variant_util_test.cpp). (cherry picked from commit accd8a0)
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
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.
What problem does this PR solve?
#62994
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)