This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new f7f6bd2fa7f [chore](be) remove some unused code to improve code test
converage (#50089)
f7f6bd2fa7f is described below
commit f7f6bd2fa7f1e1007cb3545f04bee7b79a7647d1
Author: yiguolei <[email protected]>
AuthorDate: Thu Apr 17 11:16:20 2025 +0800
[chore](be) remove some unused code to improve code test converage (#50089)
### What problem does this PR solve?
Issue Number: close #xxx
Related PR: #xxx
Problem Summary:
### 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 -->
---
be/src/runtime/primitive_type.cpp | 26 --------------------------
be/src/runtime/primitive_type.h | 2 --
be/src/vec/columns/column_nullable.cpp | 12 ------------
be/src/vec/columns/column_nullable.h | 2 --
be/test/vec/columns/column_nullable_test.cpp | 6 ------
5 files changed, 48 deletions(-)
diff --git a/be/src/runtime/primitive_type.cpp
b/be/src/runtime/primitive_type.cpp
index 189e60ef36d..ed9307584b8 100644
--- a/be/src/runtime/primitive_type.cpp
+++ b/be/src/runtime/primitive_type.cpp
@@ -25,32 +25,6 @@
namespace doris {
-bool is_type_compatible(PrimitiveType lhs, PrimitiveType rhs) {
- if (lhs == TYPE_VARCHAR) {
- return rhs == TYPE_CHAR || rhs == TYPE_VARCHAR || rhs == TYPE_HLL ||
rhs == TYPE_OBJECT ||
- rhs == TYPE_QUANTILE_STATE || rhs == TYPE_STRING;
- }
-
- if (lhs == TYPE_OBJECT) {
- return rhs == TYPE_VARCHAR || rhs == TYPE_OBJECT || rhs == TYPE_STRING;
- }
-
- if (lhs == TYPE_CHAR || lhs == TYPE_HLL) {
- return rhs == TYPE_CHAR || rhs == TYPE_VARCHAR || rhs == TYPE_HLL ||
rhs == TYPE_STRING;
- }
-
- if (lhs == TYPE_STRING) {
- return rhs == TYPE_CHAR || rhs == TYPE_VARCHAR || rhs == TYPE_HLL ||
rhs == TYPE_OBJECT ||
- rhs == TYPE_STRING;
- }
-
- if (lhs == TYPE_QUANTILE_STATE) {
- return rhs == TYPE_VARCHAR || rhs == TYPE_QUANTILE_STATE || rhs ==
TYPE_STRING;
- }
-
- return lhs == rhs;
-}
-
PrimitiveType thrift_to_type(TPrimitiveType::type ttype) {
switch (ttype) {
case TPrimitiveType::INVALID_TYPE:
diff --git a/be/src/runtime/primitive_type.h b/be/src/runtime/primitive_type.h
index 43528285a84..0a6b9e55142 100644
--- a/be/src/runtime/primitive_type.h
+++ b/be/src/runtime/primitive_type.h
@@ -108,8 +108,6 @@ constexpr bool is_int_or_bool(PrimitiveType type) {
type == TYPE_INT || type == TYPE_BIGINT || type == TYPE_LARGEINT;
}
-bool is_type_compatible(PrimitiveType lhs, PrimitiveType rhs);
-
PrimitiveType thrift_to_type(TPrimitiveType::type ttype);
TPrimitiveType::type to_thrift(PrimitiveType ptype);
std::string type_to_string(PrimitiveType t);
diff --git a/be/src/vec/columns/column_nullable.cpp
b/be/src/vec/columns/column_nullable.cpp
index 9acc839a1e9..4a23fa82990 100644
--- a/be/src/vec/columns/column_nullable.cpp
+++ b/be/src/vec/columns/column_nullable.cpp
@@ -342,24 +342,12 @@ void
ColumnNullable::append_data_by_selector(IColumn::MutablePtr& res,
this->get_null_map_column().append_data_by_selector(res_null_map,
selector, begin, end);
}
-void ColumnNullable::insert_from_not_nullable(const IColumn& src, size_t n) {
- get_nested_column().insert_from(src, n);
- _push_false_to_nullmap(1);
-}
-
void ColumnNullable::insert_range_from_not_nullable(const IColumn& src, size_t
start,
size_t length) {
get_nested_column().insert_range_from(src, start, length);
_push_false_to_nullmap(length);
}
-void ColumnNullable::insert_many_from_not_nullable(const IColumn& src, size_t
position,
- size_t length) {
- for (size_t i = 0; i < length; ++i) {
- insert_from_not_nullable(src, position);
- }
-}
-
void ColumnNullable::pop_back(size_t n) {
get_nested_column().pop_back(n);
get_null_map_column().pop_back(n);
diff --git a/be/src/vec/columns/column_nullable.h
b/be/src/vec/columns/column_nullable.h
index c35873c04ca..a98cb7bf7ad 100644
--- a/be/src/vec/columns/column_nullable.h
+++ b/be/src/vec/columns/column_nullable.h
@@ -221,9 +221,7 @@ public:
}
}
- void insert_from_not_nullable(const IColumn& src, size_t n);
void insert_range_from_not_nullable(const IColumn& src, size_t start,
size_t length);
- void insert_many_from_not_nullable(const IColumn& src, size_t position,
size_t length);
void insert_many_fix_len_data(const char* pos, size_t num) override {
_push_false_to_nullmap(num);
diff --git a/be/test/vec/columns/column_nullable_test.cpp
b/be/test/vec/columns/column_nullable_test.cpp
index 70fcd101774..b34d0ff6e2a 100644
--- a/be/test/vec/columns/column_nullable_test.cpp
+++ b/be/test/vec/columns/column_nullable_test.cpp
@@ -49,12 +49,6 @@ TEST(ColumnNullableTest, NullTest) {
EXPECT_TRUE(dst_col->has_null());
dst_col->clear();
EXPECT_FALSE(dst_col->has_null());
- dst_col->insert_many_from_not_nullable(*source_col, 0, 10);
- EXPECT_FALSE(dst_col->has_null());
- dst_col->insert_from_not_nullable(*source_col, 5);
- EXPECT_FALSE(dst_col->has_null());
- dst_col->insert_many_from_not_nullable(*source_col, 5, 5);
- EXPECT_FALSE(dst_col->has_null());
dst_col->insert_range_from_not_nullable(*source_col, 5, 5);
EXPECT_FALSE(dst_col->has_null());
dst_col->insert_range_from(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]