This is an automated email from the ASF dual-hosted git repository.
panxiaolei 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 fee2d91b363 [Chore](Type) remove some method of IDataType (#55463)
fee2d91b363 is described below
commit fee2d91b363cf5abb062c8f632c118d437984258
Author: Pxl <[email protected]>
AuthorDate: Fri Aug 29 22:49:47 2025 +0800
[Chore](Type) remove some method of IDataType (#55463)
remove some method of IDataType
---
.../aggregate_function_min_max.h | 12 +---
.../aggregate_function_min_max_by.h | 7 +-
be/src/vec/data_types/convert_field_to_type.cpp | 82 +++++++++++++---------
be/src/vec/data_types/data_type.h | 36 ----------
be/src/vec/data_types/data_type_array.h | 6 --
be/src/vec/data_types/data_type_bitmap.h | 7 --
be/src/vec/data_types/data_type_decimal.h | 5 --
.../vec/data_types/data_type_fixed_length_object.h | 3 -
be/src/vec/data_types/data_type_hll.h | 7 --
be/src/vec/data_types/data_type_jsonb.h | 3 -
be/src/vec/data_types/data_type_map.h | 4 --
be/src/vec/data_types/data_type_nothing.h | 2 -
be/src/vec/data_types/data_type_nullable.h | 11 ---
be/src/vec/data_types/data_type_number_base.h | 6 --
be/src/vec/data_types/data_type_quantilestate.h | 7 --
be/src/vec/data_types/data_type_string.h | 3 -
be/src/vec/data_types/data_type_struct.cpp | 10 ---
be/src/vec/data_types/data_type_struct.h | 3 -
be/src/vec/data_types/data_type_variant.h | 1 -
be/test/vec/data_types/common_data_type_test.h | 19 +----
.../vec/data_types/data_type_agg_state_test.cpp | 8 +--
be/test/vec/data_types/data_type_array_test.cpp | 11 +--
be/test/vec/data_types/data_type_bitmap_test.cpp | 8 +--
.../vec/data_types/data_type_datetime_v1_test.cpp | 6 --
be/test/vec/data_types/data_type_decimal_test.cpp | 9 ---
.../data_type_fixed_length_object_test.cpp | 8 +--
be/test/vec/data_types/data_type_hll_test.cpp | 8 +--
be/test/vec/data_types/data_type_ip_test.cpp | 13 +---
be/test/vec/data_types/data_type_jsonb_test.cpp | 7 --
be/test/vec/data_types/data_type_number_test.cpp | 9 ---
.../data_types/data_type_quantile_state_test.cpp | 8 +--
be/test/vec/data_types/data_type_string_test.cpp | 7 --
be/test/vec/data_types/data_type_time_v2_test.cpp | 6 --
33 files changed, 70 insertions(+), 272 deletions(-)
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max.h
b/be/src/vec/aggregate_functions/aggregate_function_min_max.h
index 5e9a291b6be..99fcccc90b5 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max.h
@@ -681,17 +681,7 @@ private:
public:
AggregateFunctionsSingleValue(const DataTypes& arguments)
: IAggregateFunctionDataHelper<Data,
AggregateFunctionsSingleValue<Data>>(arguments),
- type(this->argument_types[0]) {
- if (StringRef(Data::name()) == StringRef("min") ||
- StringRef(Data::name()) == StringRef("max")) {
- if (!type->is_comparable()) {
- throw doris::Exception(ErrorCode::INTERNAL_ERROR,
- "Illegal type {} of argument of
aggregate function {} "
- "because the values of that data type
are not comparable",
- type->get_name(), get_name());
- }
- }
- }
+ type(this->argument_types[0]) {}
void create(AggregateDataPtr __restrict place) const override {
if constexpr (std::is_same_v<Data, SingleValueDataComplexType>) {
diff --git a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
index 78a898e3b20..ae1d6756606 100644
--- a/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
+++ b/be/src/vec/aggregate_functions/aggregate_function_min_max_by.h
@@ -233,12 +233,7 @@ public:
: IAggregateFunctionDataHelper<Data,
AggregateFunctionsMinMaxBy<Data>, true>(
{arguments[0], arguments[1]}),
value_type(this->argument_types[0]),
- key_type(this->argument_types[1]) {
- if (StringRef(Data::name()) == StringRef("min_by") ||
- StringRef(Data::name()) == StringRef("max_by")) {
- CHECK(key_type->is_comparable());
- }
- }
+ key_type(this->argument_types[1]) {}
String get_name() const override { return Data::name(); }
diff --git a/be/src/vec/data_types/convert_field_to_type.cpp
b/be/src/vec/data_types/convert_field_to_type.cpp
index 34ca5863cea..420affd91b1 100644
--- a/be/src/vec/data_types/convert_field_to_type.cpp
+++ b/be/src/vec/data_types/convert_field_to_type.cpp
@@ -341,37 +341,7 @@ void convert_field_to_typeImpl(const Field& src, const
IDataType& type,
return;
}
// TODO add more types
- if (type.is_value_represented_by_number() &&
!is_string_type(src.get_type())) {
- switch (type.get_primitive_type()) {
- case PrimitiveType::TYPE_BOOLEAN:
- return convert_numric_type<TYPE_BOOLEAN>(src, type, to);
- case PrimitiveType::TYPE_TINYINT:
- return convert_numric_type<TYPE_TINYINT>(src, type, to);
- case PrimitiveType::TYPE_SMALLINT:
- return convert_numric_type<TYPE_SMALLINT>(src, type, to);
- case PrimitiveType::TYPE_INT:
- return convert_numric_type<TYPE_INT>(src, type, to);
- case PrimitiveType::TYPE_BIGINT:
- return convert_numric_type<TYPE_BIGINT>(src, type, to);
- case PrimitiveType::TYPE_LARGEINT:
- return convert_numric_type<TYPE_LARGEINT>(src, type, to);
- case PrimitiveType::TYPE_FLOAT:
- return convert_numric_type<TYPE_FLOAT>(src, type, to);
- case PrimitiveType::TYPE_DOUBLE:
- return convert_numric_type<TYPE_DOUBLE>(src, type, to);
- case PrimitiveType::TYPE_DATE:
- case PrimitiveType::TYPE_DATETIME: {
- /// We don't need any conversion UInt64 is under type of Date and
DateTime
- if (is_date_type(src.get_type())) {
- *to = src;
- return;
- }
- break;
- }
- default:
- break;
- }
- } else if (is_string_type(type.get_primitive_type())) {
+ if (is_string_type(type.get_primitive_type())) {
if (is_string_type(src.get_type())) {
*to = src;
return;
@@ -401,9 +371,9 @@ void convert_field_to_typeImpl(const Field& src, const
IDataType& type,
"Type mismatch in IN or VALUES section.
Expected: {}. Got: {}",
type.get_name(), src.get_type());
return;
- } else if (const DataTypeArray* type_array = typeid_cast<const
DataTypeArray*>(&type)) {
+ } else if (const auto* type_array = typeid_cast<const
DataTypeArray*>(&type)) {
if (src.get_type() == PrimitiveType::TYPE_ARRAY) {
- const Array& src_arr = src.get<Array>();
+ const auto& src_arr = src.get<Array>();
size_t src_arr_size = src_arr.size();
const auto& element_type = *(type_array->get_nested_type());
Array res(src_arr_size);
@@ -417,6 +387,52 @@ void convert_field_to_typeImpl(const Field& src, const
IDataType& type,
*to = Field::create_field<TYPE_ARRAY>(res);
return;
}
+ } else if (!is_string_type(src.get_type())) {
+ switch (type.get_primitive_type()) {
+ case PrimitiveType::TYPE_BOOLEAN: {
+ convert_numric_type<TYPE_BOOLEAN>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_TINYINT: {
+ convert_numric_type<TYPE_TINYINT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_SMALLINT: {
+ convert_numric_type<TYPE_SMALLINT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_INT: {
+ convert_numric_type<TYPE_INT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_BIGINT: {
+ convert_numric_type<TYPE_BIGINT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_LARGEINT: {
+ convert_numric_type<TYPE_LARGEINT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_FLOAT: {
+ convert_numric_type<TYPE_FLOAT>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_DOUBLE: {
+ convert_numric_type<TYPE_DOUBLE>(src, type, to);
+ return;
+ }
+ case PrimitiveType::TYPE_DATE:
+ case PrimitiveType::TYPE_DATETIME: {
+ /// We don't need any conversion UInt64 is under type of Date and
DateTime
+ if (is_date_type(src.get_type())) {
+ *to = src;
+ return;
+ }
+ break;
+ }
+ default:
+ break;
+ }
}
throw doris::Exception(ErrorCode::INVALID_ARGUMENT,
"Type mismatch in IN or VALUES section. Expected:
{}. Got: {}",
diff --git a/be/src/vec/data_types/data_type.h
b/be/src/vec/data_types/data_type.h
index 4cb652089ab..c802d8ddfcd 100644
--- a/be/src/vec/data_types/data_type.h
+++ b/be/src/vec/data_types/data_type.h
@@ -25,13 +25,11 @@
#include <stddef.h>
#include <stdint.h>
-#include <boost/core/noncopyable.hpp>
#include <memory>
#include <string>
#include <type_traits>
#include <vector>
-#include "common/exception.h"
#include "common/status.h"
#include "runtime/define_primitive_type.h"
#include "runtime/primitive_type.h"
@@ -40,7 +38,6 @@
#include "vec/columns/column_nothing.h"
#include "vec/columns/column_string.h"
#include "vec/common/cow.h"
-#include "vec/common/string_ref.h"
#include "vec/core/types.h"
#include "vec/data_types/serde/data_type_serde.h"
@@ -142,34 +139,6 @@ public:
/// Checks that two instances belong to the same type
virtual bool equals(const IDataType& rhs) const = 0;
- /** The data type is dependent on parameters and at least one of them is
another type.
- * Examples: Tuple(T1, T2), Nullable(T). But FixedString(N) is not.
- */
- virtual bool have_subtypes() const = 0;
-
- /** In text formats that render "pretty" tables,
- * is it better to align value right in table cell.
- * Examples: numbers, even nullable.
- */
- virtual bool should_align_right_in_pretty_formats() const { return false; }
-
- /** Does formatted value in any text format can contain anything but valid
UTF8 sequences.
- * Example: String (because it can contain arbitrary bytes).
- * Counterexamples: numbers, Date, DateTime.
- * For Enum, it depends.
- */
- virtual bool text_can_contain_only_valid_utf8() const { return false; }
-
- /** Is it possible to compare for less/greater, to calculate min/max?
- * Not necessarily totally comparable. For example, floats are comparable
despite the fact that NaNs compares to nothing.
- * The same for nullable of comparable types: they are comparable (but
not totally-comparable).
- */
- virtual bool is_comparable() const { return false; }
-
- /** Numbers, Enums, Date, DateTime. Not nullable.
- */
- virtual bool is_value_represented_by_number() const { return false; }
-
/** Example: numbers, Date, DateTime, FixedString, Enum... Nullable and
Tuple of such types.
* Counterexamples: String, Array.
* It's Ok to return false for AggregateFunction despite the fact that
some of them have fixed size state.
@@ -185,11 +154,6 @@ public:
/* the data type create from type_null, NULL literal*/
virtual bool is_null_literal() const { return false; }
- virtual bool low_cardinality() const { return false; }
-
- /// Strings, Numbers, Date, DateTime, Nullable
- virtual bool can_be_inside_low_cardinality() const { return false; }
-
virtual int64_t get_uncompressed_serialized_bytes(const IColumn& column,
int be_exec_version)
const = 0;
virtual char* serialize(const IColumn& column, char* buf, int
be_exec_version) const = 0;
diff --git a/be/src/vec/data_types/data_type_array.h
b/be/src/vec/data_types/data_type_array.h
index 9cd35bfac99..b15b499edc1 100644
--- a/be/src/vec/data_types/data_type_array.h
+++ b/be/src/vec/data_types/data_type_array.h
@@ -82,12 +82,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return true; }
- bool text_can_contain_only_valid_utf8() const override {
- return nested->text_can_contain_only_valid_utf8();
- }
- bool is_comparable() const override { return nested->is_comparable(); }
-
const DataTypePtr& get_nested_type() const { return nested; }
/// 1 for plain array, 2 for array of arrays and so on.
diff --git a/be/src/vec/data_types/data_type_bitmap.h
b/be/src/vec/data_types/data_type_bitmap.h
index deb6e2f09a0..7765cdca088 100644
--- a/be/src/vec/data_types/data_type_bitmap.h
+++ b/be/src/vec/data_types/data_type_bitmap.h
@@ -66,15 +66,8 @@ public:
MutableColumnPtr create_column() const override;
Status check_column(const IColumn& column) const override;
- bool have_subtypes() const override { return false; }
- bool should_align_right_in_pretty_formats() const override { return false;
}
- bool text_can_contain_only_valid_utf8() const override { return true; }
- bool is_comparable() const override { return false; }
-
bool equals(const IDataType& rhs) const override { return typeid(rhs) ==
typeid(*this); }
- bool can_be_inside_low_cardinality() const override { return false; }
-
std::string to_string(const IColumn& column, size_t row_num) const
override {
auto result = check_column_const_set_readability(column, row_num);
ColumnPtr ptr = result.first;
diff --git a/be/src/vec/data_types/data_type_decimal.h
b/be/src/vec/data_types/data_type_decimal.h
index c41f484f9b6..6b4f88fbd9e 100644
--- a/be/src/vec/data_types/data_type_decimal.h
+++ b/be/src/vec/data_types/data_type_decimal.h
@@ -220,11 +220,6 @@ public:
Status check_column(const IColumn& column) const override;
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return false; }
- bool should_align_right_in_pretty_formats() const override { return true; }
- bool text_can_contain_only_valid_utf8() const override { return true; }
- bool is_comparable() const override { return true; }
- bool is_value_represented_by_number() const override { return true; }
bool have_maximum_size_of_value() const override { return true; }
size_t get_size_of_value_in_memory() const override { return
sizeof(FieldType); }
diff --git a/be/src/vec/data_types/data_type_fixed_length_object.h
b/be/src/vec/data_types/data_type_fixed_length_object.h
index 3a3828c21a1..e7e5e4c5917 100644
--- a/be/src/vec/data_types/data_type_fixed_length_object.h
+++ b/be/src/vec/data_types/data_type_fixed_length_object.h
@@ -70,9 +70,6 @@ public:
MutableColumnPtr create_column() const override;
Status check_column(const IColumn& column) const override;
- bool have_subtypes() const override { return false; }
-
- bool can_be_inside_low_cardinality() const override { return false; }
using SerDeType = DataTypeFixedLengthObjectSerDe;
DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override {
return std::make_shared<SerDeType>(nesting_level);
diff --git a/be/src/vec/data_types/data_type_hll.h
b/be/src/vec/data_types/data_type_hll.h
index 0d3f8d3ce1b..7a397e675c0 100644
--- a/be/src/vec/data_types/data_type_hll.h
+++ b/be/src/vec/data_types/data_type_hll.h
@@ -66,15 +66,8 @@ public:
MutableColumnPtr create_column() const override;
Status check_column(const IColumn& column) const override;
- bool have_subtypes() const override { return false; }
- bool should_align_right_in_pretty_formats() const override { return false;
}
- bool text_can_contain_only_valid_utf8() const override { return true; }
- bool is_comparable() const override { return false; }
-
bool equals(const IDataType& rhs) const override { return typeid(rhs) ==
typeid(*this); }
- bool can_be_inside_low_cardinality() const override { return false; }
-
std::string to_string(const IColumn& column, size_t row_num) const
override { return "HLL()"; }
void to_string(const IColumn& column, size_t row_num, BufferWritable&
ostr) const override;
diff --git a/be/src/vec/data_types/data_type_jsonb.h
b/be/src/vec/data_types/data_type_jsonb.h
index c1d3940d54b..73677338d71 100644
--- a/be/src/vec/data_types/data_type_jsonb.h
+++ b/be/src/vec/data_types/data_type_jsonb.h
@@ -73,9 +73,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return false; }
- bool is_comparable() const override { return false; }
- bool can_be_inside_low_cardinality() const override { return true; }
std::string to_string(const IColumn& column, size_t row_num) const
override;
void to_string(const IColumn& column, size_t row_num, BufferWritable&
ostr) const override;
using SerDeType = DataTypeJsonbSerDe;
diff --git a/be/src/vec/data_types/data_type_map.h
b/be/src/vec/data_types/data_type_map.h
index d47629fe975..33632a1cb8e 100644
--- a/be/src/vec/data_types/data_type_map.h
+++ b/be/src/vec/data_types/data_type_map.h
@@ -76,10 +76,6 @@ public:
}
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return true; }
- bool is_comparable() const override {
- return key_type->is_comparable() && value_type->is_comparable();
- }
const DataTypePtr& get_key_type() const { return key_type; }
const DataTypePtr& get_value_type() const { return value_type; }
diff --git a/be/src/vec/data_types/data_type_nothing.h
b/be/src/vec/data_types/data_type_nothing.h
index 8f9a79488ff..b053960029e 100644
--- a/be/src/vec/data_types/data_type_nothing.h
+++ b/be/src/vec/data_types/data_type_nothing.h
@@ -59,7 +59,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool text_can_contain_only_valid_utf8() const override { return true; }
bool have_maximum_size_of_value() const override { return true; }
size_t get_size_of_value_in_memory() const override { return 0; }
@@ -82,7 +81,6 @@ public:
"Unimplemented get_field for Nothing");
}
- bool have_subtypes() const override { return false; }
using SerDeType = DataTypeNothingSerde;
DataTypeSerDeSPtr get_serde(int nesting_level = 1) const override {
return std::make_shared<SerDeType>();
diff --git a/be/src/vec/data_types/data_type_nullable.h
b/be/src/vec/data_types/data_type_nullable.h
index c5246e81e9c..5c75d9d0637 100644
--- a/be/src/vec/data_types/data_type_nullable.h
+++ b/be/src/vec/data_types/data_type_nullable.h
@@ -87,14 +87,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return true; }
- bool should_align_right_in_pretty_formats() const override {
- return nested_data_type->should_align_right_in_pretty_formats();
- }
- bool text_can_contain_only_valid_utf8() const override {
- return nested_data_type->text_can_contain_only_valid_utf8();
- }
- bool is_comparable() const override { return
nested_data_type->is_comparable(); }
bool have_maximum_size_of_value() const override {
return nested_data_type->have_maximum_size_of_value();
}
@@ -102,9 +94,6 @@ public:
return 1 + nested_data_type->get_size_of_value_in_memory();
}
bool is_nullable() const override { return true; }
- bool can_be_inside_low_cardinality() const override {
- return nested_data_type->can_be_inside_low_cardinality();
- }
std::string to_string(const IColumn& column, size_t row_num) const
override;
void to_string(const IColumn& column, size_t row_num, BufferWritable&
ostr) const override;
diff --git a/be/src/vec/data_types/data_type_number_base.h
b/be/src/vec/data_types/data_type_number_base.h
index 2d2c32acdee..d4213e92d0c 100644
--- a/be/src/vec/data_types/data_type_number_base.h
+++ b/be/src/vec/data_types/data_type_number_base.h
@@ -127,16 +127,10 @@ public:
MutableColumnPtr create_column() const override;
Status check_column(const IColumn& column) const override;
- bool have_subtypes() const override { return false; }
- bool should_align_right_in_pretty_formats() const override { return true; }
- bool text_can_contain_only_valid_utf8() const override { return true; }
- bool is_comparable() const override { return true; }
- bool is_value_represented_by_number() const override { return true; }
bool have_maximum_size_of_value() const override { return true; }
size_t get_size_of_value_in_memory() const override {
return sizeof(typename PrimitiveTypeTraits<T>::ColumnItemType);
}
- bool can_be_inside_low_cardinality() const override { return true; }
void to_string(const IColumn& column, size_t row_num, BufferWritable&
ostr) const override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
diff --git a/be/src/vec/data_types/data_type_quantilestate.h
b/be/src/vec/data_types/data_type_quantilestate.h
index e7cac2548ba..934b88c8a0d 100644
--- a/be/src/vec/data_types/data_type_quantilestate.h
+++ b/be/src/vec/data_types/data_type_quantilestate.h
@@ -62,15 +62,8 @@ public:
MutableColumnPtr create_column() const override;
Status check_column(const IColumn& column) const override;
- bool have_subtypes() const override { return false; }
- bool should_align_right_in_pretty_formats() const override { return false;
}
- bool text_can_contain_only_valid_utf8() const override { return true; }
- bool is_comparable() const override { return false; }
-
bool equals(const IDataType& rhs) const override { return typeid(rhs) ==
typeid(*this); }
- bool can_be_inside_low_cardinality() const override { return false; }
-
std::string to_string(const IColumn& column, size_t row_num) const
override {
return "QuantileState()";
}
diff --git a/be/src/vec/data_types/data_type_string.h
b/be/src/vec/data_types/data_type_string.h
index 392a928573f..df11eced689 100644
--- a/be/src/vec/data_types/data_type_string.h
+++ b/be/src/vec/data_types/data_type_string.h
@@ -80,9 +80,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return false; }
- bool is_comparable() const override { return true; }
- bool can_be_inside_low_cardinality() const override { return true; }
std::string to_string(const IColumn& column, size_t row_num) const
override;
void to_string(const IColumn& column, size_t row_num, BufferWritable&
ostr) const override;
using SerDeType = DataTypeStringSerDe;
diff --git a/be/src/vec/data_types/data_type_struct.cpp
b/be/src/vec/data_types/data_type_struct.cpp
index 92f1268202d..0f6373d23a0 100644
--- a/be/src/vec/data_types/data_type_struct.cpp
+++ b/be/src/vec/data_types/data_type_struct.cpp
@@ -308,21 +308,11 @@ void DataTypeStruct::to_pb_column_meta(PColumnMeta*
col_meta) const {
}
}
-bool DataTypeStruct::text_can_contain_only_valid_utf8() const {
- return std::all_of(elems.begin(), elems.end(),
- [](auto&& elem) { return
elem->text_can_contain_only_valid_utf8(); });
-}
-
bool DataTypeStruct::have_maximum_size_of_value() const {
return std::all_of(elems.begin(), elems.end(),
[](auto&& elem) { return
elem->have_maximum_size_of_value(); });
}
-bool DataTypeStruct::is_comparable() const {
- return std::all_of(elems.begin(), elems.end(),
- [](auto&& elem) { return elem->is_comparable(); });
-}
-
size_t DataTypeStruct::get_size_of_value_in_memory() const {
size_t res = 0;
for (const auto& elem : elems) {
diff --git a/be/src/vec/data_types/data_type_struct.h
b/be/src/vec/data_types/data_type_struct.h
index c9dab82649a..b8d61ba5ec8 100644
--- a/be/src/vec/data_types/data_type_struct.h
+++ b/be/src/vec/data_types/data_type_struct.h
@@ -92,9 +92,6 @@ public:
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return !elems.empty(); }
- bool is_comparable() const override;
- bool text_can_contain_only_valid_utf8() const override;
bool have_maximum_size_of_value() const override;
size_t get_size_of_value_in_memory() const override;
diff --git a/be/src/vec/data_types/data_type_variant.h
b/be/src/vec/data_types/data_type_variant.h
index fc0bef32f60..34de36146bf 100644
--- a/be/src/vec/data_types/data_type_variant.h
+++ b/be/src/vec/data_types/data_type_variant.h
@@ -69,7 +69,6 @@ public:
}
MutableColumnPtr create_column() const override;
bool equals(const IDataType& rhs) const override;
- bool have_subtypes() const override { return true; };
int64_t get_uncompressed_serialized_bytes(const IColumn& column,
int be_exec_version) const
override;
std::string to_string(const IColumn& column, size_t row_num) const
override;
diff --git a/be/test/vec/data_types/common_data_type_test.h
b/be/test/vec/data_types/common_data_type_test.h
index 5920f7ebb43..4425dd31c94 100644
--- a/be/test/vec/data_types/common_data_type_test.h
+++ b/be/test/vec/data_types/common_data_type_test.h
@@ -36,18 +36,17 @@
// for example DataTypeIPv4 should test this function:
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
// get_field
-// is_null_literal, is_value_represented_by_number,
is_value_unambiguously_represented_in_fixed_size_contiguous_memory_region
+// is_null_literal,
is_value_unambiguously_represented_in_fixed_size_contiguous_memory_region
// 2. datatype creation with column: create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
// this two function should move to DataTypeSerDe and only used in
Block
// serialize (const IColumn &column, char *buf, int be_exec_version),
deserialize (const char *buf, MutableColumnPtr *column, int be_exec_version)
-// 4. compare: equals (const IDataType &rhs), is_comparable
+// 4. compare: equals (const IDataType &rhs)
namespace doris::vectorized {
@@ -105,14 +104,11 @@ public:
std::string family_name;
bool has_subtypes = false;
doris::FieldType storage_field_type =
doris::FieldType::OLAP_FIELD_TYPE_UNKNOWN;
- bool should_align_right_in_pretty_formats = false;
- bool text_can_contain_only_valid_utf8 = false;
bool have_maximum_size_of_value = false;
size_t size_of_value_in_memory = -1;
size_t precision = -1;
size_t scale = -1;
bool is_null_literal = true;
- bool is_value_represented_by_number = false;
PColumnMeta* pColumnMeta = nullptr;
DataTypeSerDeSPtr serde = nullptr;
Field default_field;
@@ -126,12 +122,7 @@ public:
ASSERT_TRUE(data_type->equals(*meta_info.type_as_type_descriptor))
<< data_type->get_name() << " " <<
meta_info.type_as_type_descriptor->get_name();
ASSERT_EQ(data_type->get_family_name(), meta_info.family_name);
- ASSERT_EQ(data_type->have_subtypes(), meta_info.has_subtypes);
ASSERT_EQ(data_type->get_storage_field_type(),
meta_info.storage_field_type);
- ASSERT_EQ(data_type->should_align_right_in_pretty_formats(),
- meta_info.should_align_right_in_pretty_formats);
- ASSERT_EQ(data_type->text_can_contain_only_valid_utf8(),
- meta_info.text_can_contain_only_valid_utf8);
ASSERT_EQ(data_type->have_maximum_size_of_value(),
meta_info.have_maximum_size_of_value);
if (is_decimal(data_type->get_primitive_type()) ||
data_type->is_nullable() ||
data_type->get_primitive_type() == TYPE_STRUCT ||
@@ -154,8 +145,6 @@ public:
EXPECT_EQ(data_type->get_scale(), 0);
}
ASSERT_EQ(data_type->is_null_literal(), meta_info.is_null_literal);
- ASSERT_EQ(data_type->is_value_represented_by_number(),
- meta_info.is_value_represented_by_number);
ASSERT_EQ(data_type->get_default(), meta_info.default_field);
}
@@ -284,8 +273,6 @@ public:
// should all datatype is compare?
void assert_compare_behavior(const DataTypePtr& l_dt, const DataTypePtr&
r_dt) {
- ASSERT_TRUE(l_dt->is_comparable());
- ASSERT_TRUE(r_dt->is_comparable());
// compare
ASSERT_FALSE(l_dt->equals(*r_dt));
}
diff --git a/be/test/vec/data_types/data_type_agg_state_test.cpp
b/be/test/vec/data_types/data_type_agg_state_test.cpp
index 4616d00bb06..3db339d8091 100644
--- a/be/test/vec/data_types/data_type_agg_state_test.cpp
+++ b/be/test/vec/data_types/data_type_agg_state_test.cpp
@@ -41,11 +41,10 @@
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
@@ -82,14 +81,11 @@ TEST_P(DataTypeAggStateTest, MetaInfoTest) {
.family_name = "AggState",
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_AGG_STATE,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = false,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_STRING>(String()),
};
diff --git a/be/test/vec/data_types/data_type_array_test.cpp
b/be/test/vec/data_types/data_type_array_test.cpp
index 4e86298ee43..7ccdc64a90b 100644
--- a/be/test/vec/data_types/data_type_array_test.cpp
+++ b/be/test/vec/data_types/data_type_array_test.cpp
@@ -42,16 +42,15 @@
// for example DataTypeIPv4 should test this function:
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
// serialize (const IColumn &column, char *buf, int be_exec_version),
deserialize (const char *buf, MutableColumnPtr *column, int be_exec_version)
-// 4. compare: equals (const IDataType &rhs), is_comparable
+// 4. compare: equals (const IDataType &rhs)
// 5. others: update_avg_value_size_hint (const IColumn &column, double
&avg_value_size_hint)
namespace doris::vectorized {
@@ -349,14 +348,11 @@ TEST_F(DataTypeArrayTest, MetaInfoTest) {
.family_name = "Array",
.has_subtypes = true,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_ARRAY,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 =
nested_type->text_can_contain_only_valid_utf8(),
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_ARRAY>(a),
};
@@ -457,7 +453,6 @@ TEST_F(DataTypeArrayTest, CompareTest) {
for (auto& type : array_types) {
const auto* array_type = assert_cast<const
DataTypeArray*>(remove_nullable(type).get());
auto nested_type = array_type->get_nested_type();
- EXPECT_EQ(nested_type->is_comparable(), array_type->is_comparable());
EXPECT_FALSE(array_type->equals(*type));
}
}
diff --git a/be/test/vec/data_types/data_type_bitmap_test.cpp
b/be/test/vec/data_types/data_type_bitmap_test.cpp
index c5e0dfd26c9..bb3bfaf80c9 100644
--- a/be/test/vec/data_types/data_type_bitmap_test.cpp
+++ b/be/test/vec/data_types/data_type_bitmap_test.cpp
@@ -37,11 +37,10 @@
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
@@ -73,14 +72,11 @@ TEST_P(DataTypeBitMapTest, MetaInfoTest) {
.family_name = "BitMap",
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_BITMAP,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field =
Field::create_field<TYPE_BITMAP>(BitmapValue::empty_bitmap()),
};
diff --git a/be/test/vec/data_types/data_type_datetime_v1_test.cpp
b/be/test/vec/data_types/data_type_datetime_v1_test.cpp
index 726d4c82b94..47025f0a53d 100644
--- a/be/test/vec/data_types/data_type_datetime_v1_test.cpp
+++ b/be/test/vec/data_types/data_type_datetime_v1_test.cpp
@@ -77,14 +77,8 @@ TEST_F(DataTypeDateTimeV1Test, simple_func_test) {
auto test_func = [](auto& dt) {
using DataType = decltype(dt);
using FieldType = typename
std::remove_reference<DataType>::type::FieldType;
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_TRUE(dt.should_align_right_in_pretty_formats());
- EXPECT_TRUE(dt.text_can_contain_only_valid_utf8());
- EXPECT_TRUE(dt.is_comparable());
- EXPECT_TRUE(dt.is_value_represented_by_number());
EXPECT_TRUE(dt.have_maximum_size_of_value());
EXPECT_EQ(dt.get_size_of_value_in_memory(), sizeof(FieldType));
- EXPECT_TRUE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
dt.set_null_literal(true);
diff --git a/be/test/vec/data_types/data_type_decimal_test.cpp
b/be/test/vec/data_types/data_type_decimal_test.cpp
index d245110dc7d..5a7b005bf5b 100644
--- a/be/test/vec/data_types/data_type_decimal_test.cpp
+++ b/be/test/vec/data_types/data_type_decimal_test.cpp
@@ -201,14 +201,11 @@ TEST_F(DataTypeDecimalTest, MetaInfoTest) {
.family_name = tmp_dt->get_family_name(),
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_DECIMAL32,
- .should_align_right_in_pretty_formats = true,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = true,
.size_of_value_in_memory = sizeof(Decimal32),
.precision = tmp_dt->get_precision(),
.scale = tmp_dt->get_scale(),
.is_null_literal = false,
- .is_value_represented_by_number = true,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_DECIMAL32>(
DecimalField<Decimal32>(0, tmp_dt->get_scale())),
@@ -253,14 +250,8 @@ TEST_F(DataTypeDecimalTest, simple_func_test) {
auto test_func = [](auto& dt) {
using DataType = decltype(dt);
using FieldType = typename
std::remove_reference<DataType>::type::FieldType;
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_TRUE(dt.should_align_right_in_pretty_formats());
- EXPECT_TRUE(dt.text_can_contain_only_valid_utf8());
- EXPECT_TRUE(dt.is_comparable());
- EXPECT_TRUE(dt.is_value_represented_by_number());
EXPECT_TRUE(dt.have_maximum_size_of_value());
EXPECT_EQ(dt.get_size_of_value_in_memory(), sizeof(FieldType));
- EXPECT_FALSE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
diff --git a/be/test/vec/data_types/data_type_fixed_length_object_test.cpp
b/be/test/vec/data_types/data_type_fixed_length_object_test.cpp
index 7951baf9dce..ad0df6b5bd4 100644
--- a/be/test/vec/data_types/data_type_fixed_length_object_test.cpp
+++ b/be/test/vec/data_types/data_type_fixed_length_object_test.cpp
@@ -38,11 +38,10 @@
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
@@ -73,14 +72,11 @@ TEST_P(DataTypeFixedLengthObjectTest, MetaInfoTest) {
.family_name = "DataTypeFixedLengthObject",
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_NONE,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = false,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_STRING>(String()),
};
diff --git a/be/test/vec/data_types/data_type_hll_test.cpp
b/be/test/vec/data_types/data_type_hll_test.cpp
index a08e1027435..2ca1e555ab6 100644
--- a/be/test/vec/data_types/data_type_hll_test.cpp
+++ b/be/test/vec/data_types/data_type_hll_test.cpp
@@ -37,11 +37,10 @@
// for example DataTypeHLL should test this function:
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
@@ -74,14 +73,11 @@ TEST_P(DataTypeHLLTest, MetaInfoTest) {
.family_name = "HLL",
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_HLL,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field =
Field::create_field<TYPE_HLL>(HyperLogLog::empty()),
};
diff --git a/be/test/vec/data_types/data_type_ip_test.cpp
b/be/test/vec/data_types/data_type_ip_test.cpp
index 6322b6d813d..5ca0ff18798 100644
--- a/be/test/vec/data_types/data_type_ip_test.cpp
+++ b/be/test/vec/data_types/data_type_ip_test.cpp
@@ -35,16 +35,15 @@
// for example DataTypeIPv4 should test this function:
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to), from_string (ReadBuffer &rb,
IColumn *column)
// serialize (const IColumn &column, char *buf, int be_exec_version),
deserialize (const char *buf, MutableColumnPtr *column, int be_exec_version)
-// 4. compare: equals (const IDataType &rhs), is_comparable
+// 4. compare: equals (const IDataType &rhs)
// 5. others: update_avg_value_size_hint (const IColumn &column, double
&avg_value_size_hint)
namespace doris::vectorized {
@@ -81,14 +80,11 @@ TEST_F(DataTypeIPTest, MetaInfoTest) {
.family_name = "IPv4",
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_IPV4,
- .should_align_right_in_pretty_formats = true,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = true,
.size_of_value_in_memory = sizeof(IPv4),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = true,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_IPV4>(IPv4(0)),
};
@@ -101,14 +97,11 @@ TEST_F(DataTypeIPTest, MetaInfoTest) {
.family_name = "IPv6",
.has_subtypes = false,
.storage_field_type =
doris::FieldType::OLAP_FIELD_TYPE_IPV6,
- .should_align_right_in_pretty_formats =
true,
- .text_can_contain_only_valid_utf8 =
true,
.have_maximum_size_of_value = true,
.size_of_value_in_memory = sizeof(IPv6),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = true,
.pColumnMeta = col_meta6.get(),
.default_field =
Field::create_field<TYPE_IPV6>(IPv6(0))};
meta_info_assert(dt_ipv4, ipv4_meta_info_to_assert);
diff --git a/be/test/vec/data_types/data_type_jsonb_test.cpp
b/be/test/vec/data_types/data_type_jsonb_test.cpp
index aa86a28d5b3..40954941282 100644
--- a/be/test/vec/data_types/data_type_jsonb_test.cpp
+++ b/be/test/vec/data_types/data_type_jsonb_test.cpp
@@ -90,14 +90,11 @@ TEST_F(DataTypeJsonbTest, MetaInfoTest) {
.family_name = dt_jsonb.get_family_name(),
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_JSONB,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = false,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = 0,
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_JSONB>(JsonbField())};
auto tmp_dt =
DataTypeFactory::instance().create_data_type(PrimitiveType::TYPE_JSONB, false);
@@ -260,11 +257,7 @@ TEST_F(DataTypeJsonbTest, ser_deser) {
TEST_F(DataTypeJsonbTest, simple_func_test) {
auto test_func = [](auto& dt) {
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_FALSE(dt.should_align_right_in_pretty_formats());
- EXPECT_FALSE(dt.is_comparable());
EXPECT_FALSE(dt.have_maximum_size_of_value());
- EXPECT_TRUE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
diff --git a/be/test/vec/data_types/data_type_number_test.cpp
b/be/test/vec/data_types/data_type_number_test.cpp
index c6f8da974d9..4849cc4cf5e 100644
--- a/be/test/vec/data_types/data_type_number_test.cpp
+++ b/be/test/vec/data_types/data_type_number_test.cpp
@@ -119,14 +119,11 @@ TEST_F(DataTypeNumberTest, MetaInfoTest) {
.family_name = dt_int8.get_family_name(),
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_TINYINT,
- .should_align_right_in_pretty_formats = true,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = true,
.size_of_value_in_memory = sizeof(Int8),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = true,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_TINYINT>((Int8)0),
};
@@ -438,14 +435,8 @@ TEST_F(DataTypeNumberTest, simple_func_test) {
auto test_func = [](auto& dt) {
using DataType = decltype(dt);
using FieldType = typename
std::remove_reference<DataType>::type::FieldType;
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_TRUE(dt.should_align_right_in_pretty_formats());
- EXPECT_TRUE(dt.text_can_contain_only_valid_utf8());
- EXPECT_TRUE(dt.is_comparable());
- EXPECT_TRUE(dt.is_value_represented_by_number());
EXPECT_TRUE(dt.have_maximum_size_of_value());
EXPECT_EQ(dt.get_size_of_value_in_memory(), sizeof(FieldType));
- EXPECT_TRUE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
dt.set_null_literal(true);
diff --git a/be/test/vec/data_types/data_type_quantile_state_test.cpp
b/be/test/vec/data_types/data_type_quantile_state_test.cpp
index 342e3a5852a..89d60b225a3 100644
--- a/be/test/vec/data_types/data_type_quantile_state_test.cpp
+++ b/be/test/vec/data_types/data_type_quantile_state_test.cpp
@@ -37,11 +37,10 @@
// for example DataTypeQuantileState should test this function:
// 1. datatype meta info:
// get_type_id, get_type_as_type_descriptor, get_storage_field_type,
have_subtypes, get_pdata_type (const IDataType *data_type), to_pb_column_meta
(PColumnMeta *col_meta)
-// get_family_name, get_is_parametric,
should_align_right_in_pretty_formats
-// text_can_contain_only_valid_utf8
+// get_family_name, get_is_parametric,
// have_maximum_size_of_value, get_maximum_size_of_value_in_memory,
get_size_of_value_in_memory
// get_precision, get_scale
-// is_null_literal, is_value_represented_by_number
+// is_null_literal
// 2. datatype creation with column : create_column, create_column_const
(size_t size, const Field &field), create_column_const_with_default_value
(size_t size), get_uncompressed_serialized_bytes (const IColumn &column, int
be_exec_version)
// 3. serde related: get_serde (int nesting_level=1)
// to_string (const IColumn &column, size_t row_num, BufferWritable
&ostr), to_string (const IColumn &column, size_t row_num), to_string_batch
(const IColumn &column, ColumnString &column_to)
@@ -74,14 +73,11 @@ TEST_P(DataTypeQuantileStateTest, MetaInfoTest) {
.family_name = "QuantileState",
.has_subtypes = false,
.storage_field_type =
doris::FieldType::OLAP_FIELD_TYPE_QUANTILE_STATE,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = true,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = size_t(-1),
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field =
Field::create_field<TYPE_QUANTILE_STATE>(QuantileState()),
};
diff --git a/be/test/vec/data_types/data_type_string_test.cpp
b/be/test/vec/data_types/data_type_string_test.cpp
index 26470e4e6d3..c549f123b00 100644
--- a/be/test/vec/data_types/data_type_string_test.cpp
+++ b/be/test/vec/data_types/data_type_string_test.cpp
@@ -92,14 +92,11 @@ TEST_F(DataTypeStringTest, MetaInfoTest) {
.family_name = dt_str.get_family_name(),
.has_subtypes = false,
.storage_field_type = doris::FieldType::OLAP_FIELD_TYPE_STRING,
- .should_align_right_in_pretty_formats = false,
- .text_can_contain_only_valid_utf8 = false,
.have_maximum_size_of_value = false,
.size_of_value_in_memory = 0,
.precision = size_t(-1),
.scale = size_t(-1),
.is_null_literal = false,
- .is_value_represented_by_number = false,
.pColumnMeta = col_meta.get(),
.default_field = Field::create_field<TYPE_STRING>(""),
};
@@ -262,11 +259,7 @@ TEST_F(DataTypeStringTest, ser_deser) {
}
TEST_F(DataTypeStringTest, simple_func_test) {
auto test_func = [](auto& dt) {
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_FALSE(dt.should_align_right_in_pretty_formats());
- EXPECT_TRUE(dt.is_comparable());
EXPECT_FALSE(dt.have_maximum_size_of_value());
- EXPECT_TRUE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
diff --git a/be/test/vec/data_types/data_type_time_v2_test.cpp
b/be/test/vec/data_types/data_type_time_v2_test.cpp
index 45497ba8d6b..146d77ce9d7 100644
--- a/be/test/vec/data_types/data_type_time_v2_test.cpp
+++ b/be/test/vec/data_types/data_type_time_v2_test.cpp
@@ -103,14 +103,8 @@ TEST_F(DataTypeDateTimeV2Test, simple_func_test) {
auto test_func = [](auto& dt) {
using DataType = decltype(dt);
using FieldType = typename
std::remove_reference<DataType>::type::FieldType;
- EXPECT_FALSE(dt.have_subtypes());
- EXPECT_TRUE(dt.should_align_right_in_pretty_formats());
- EXPECT_TRUE(dt.text_can_contain_only_valid_utf8());
- EXPECT_TRUE(dt.is_comparable());
- EXPECT_TRUE(dt.is_value_represented_by_number());
EXPECT_TRUE(dt.have_maximum_size_of_value());
EXPECT_EQ(dt.get_size_of_value_in_memory(), sizeof(FieldType));
- EXPECT_TRUE(dt.can_be_inside_low_cardinality());
EXPECT_FALSE(dt.is_null_literal());
dt.set_null_literal(true);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]