-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[refine](code) remove dead code across core types and utilities #62994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,18 +25,15 @@ | |
| #include <glog/logging.h> | ||
| #include <snappy.h> | ||
| #include <streamvbyte.h> | ||
| #include <sys/types.h> | ||
|
|
||
| #include <algorithm> | ||
| #include <cassert> | ||
| #include <iomanip> | ||
| #include <iterator> | ||
| #include <limits> | ||
| #include <ranges> | ||
|
|
||
| #include "agent/be_exec_version_manager.h" | ||
| #include "common/compiler_util.h" // IWYU pragma: keep | ||
| #include "common/config.h" | ||
| #include "common/logging.h" | ||
| #include "common/status.h" | ||
| #include "core/assert_cast.h" | ||
|
|
@@ -353,25 +350,6 @@ size_t Block::bytes() const { | |
| return res; | ||
| } | ||
|
|
||
| std::string Block::columns_bytes() const { | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The implementation is removed, but |
||
| std::stringstream res; | ||
| res << "column bytes: ["; | ||
| for (const auto& elem : data) { | ||
| if (!elem.column) { | ||
| std::stringstream ss; | ||
| for (const auto& e : data) { | ||
| ss << e.name + " "; | ||
| } | ||
| throw Exception(ErrorCode::INTERNAL_ERROR, | ||
| "Column {} in block is nullptr, in method bytes. All Columns are {}", | ||
| elem.name, ss.str()); | ||
| } | ||
| res << ", " << elem.column->byte_size(); | ||
| } | ||
| res << "]"; | ||
| return res.str(); | ||
| } | ||
|
|
||
| size_t Block::allocated_bytes() const { | ||
| size_t res = 0; | ||
| for (const auto& elem : data) { | ||
|
|
@@ -619,17 +597,6 @@ void Block::set_columns(MutableColumns&& columns) { | |
| } | ||
| } | ||
|
|
||
| Block Block::clone_with_columns(MutableColumns&& columns) const { | ||
| Block res; | ||
|
|
||
| size_t num_columns = data.size(); | ||
| for (size_t i = 0; i < num_columns; ++i) { | ||
| res.insert({std::move(columns[i]), data[i].type, data[i].name}); | ||
| } | ||
|
|
||
| return res; | ||
| } | ||
|
|
||
| Block Block::clone_without_columns(const std::vector<int>* column_offset) const { | ||
| Block res; | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -30,7 +30,6 @@ | |
| namespace doris { | ||
| class PValues; | ||
| struct JsonbValue; | ||
| class JsonWriter; | ||
|
|
||
| class IColumn; | ||
| class Arena; | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these union helpers breaks the benchmark target.
be/benchmark/benchmark_main.cppstill includesbinary_cast_benchmark.hpp, and that header'sold_binary_cast()still referencesTypeConverter,VecDateTimeInt64Union,DateV2UInt32Union,DateTimeV2UInt64Union, andDecimalInt128Union. Sincebe/CMakeLists.txtbuilds this file whenBUILD_BENCHMARKis enabled,-DBUILD_BENCHMARK=ONwill no longer compile. Please either update/remove the benchmark's old implementation or keep local benchmark-only definitions.