Mryange opened a new pull request, #62994:
URL: https://github.com/apache/doris/pull/62994
What problem does this PR solve?
Issue Number: N/A
Problem Summary:
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).
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]