Skip to content

Commit

Permalink
[minor](column) remove function "is_value_represented_by" (#44893)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?
[minor](column) remove function "is_value_represented_by"
  • Loading branch information
Mryange authored Dec 5, 2024
1 parent 6b4b3cb commit aa4318f
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 33 deletions.
12 changes: 0 additions & 12 deletions be/src/vec/data_types/data_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,8 @@ class IDataType : private boost::noncopyable {
*/
virtual bool is_value_represented_by_number() const { return false; }

/** Integers, Enums, Date, DateTime. Not nullable.
*/
virtual bool is_value_represented_by_integer() const { return false; }

virtual bool is_object() const { return false; }

/** Unsigned Integers, Date, DateTime. Not nullable.
*/
virtual bool is_value_represented_by_unsigned_integer() const { return false; }

/** Values are unambiguously identified by contents of contiguous memory region,
* that can be obtained by IColumn::get_data_at method.
* Examples: numbers, Date, DateTime, String, FixedString,
Expand Down Expand Up @@ -386,10 +378,6 @@ inline bool is_not_decimal_but_comparable_to_decimal(const DataTypePtr& data_typ
return which.is_int() || which.is_uint();
}

inline bool is_compilable_type(const DataTypePtr& data_type) {
return data_type->is_value_represented_by_number() && !is_decimal(data_type);
}

inline bool is_complex_type(const DataTypePtr& data_type) {
WhichDataType which(data_type);
return which.is_array() || which.is_map() || which.is_struct();
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/data_types/data_type_bitmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,6 @@ class DataTypeBitMap : public IDataType {
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 is_value_represented_by_number() const override { return false; }
bool is_value_represented_by_integer() const override { return false; }
bool is_value_represented_by_unsigned_integer() const override { return false; }
// TODO:
bool is_value_unambiguously_represented_in_contiguous_memory_region() const override {
return true;
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/data_types/data_type_hll.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ class DataTypeHLL : public IDataType {
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 is_value_represented_by_number() const override { return false; }
bool is_value_represented_by_integer() const override { return false; }
bool is_value_represented_by_unsigned_integer() const override { return false; }
// TODO:
bool is_value_unambiguously_represented_in_contiguous_memory_region() const override {
return true;
Expand Down
10 changes: 0 additions & 10 deletions be/src/vec/data_types/data_type_number_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,16 +313,6 @@ MutableColumnPtr DataTypeNumberBase<T>::create_column() const {
return ColumnVector<T>::create();
}

template <typename T>
bool DataTypeNumberBase<T>::is_value_represented_by_integer() const {
return std::is_integral_v<T>;
}

template <typename T>
bool DataTypeNumberBase<T>::is_value_represented_by_unsigned_integer() const {
return std::is_integral_v<T> && std::is_unsigned_v<T>;
}

/// Explicit template instantiations - to avoid code bloat in headers.
template class DataTypeNumberBase<UInt8>;
template class DataTypeNumberBase<UInt16>;
Expand Down
2 changes: 0 additions & 2 deletions be/src/vec/data_types/data_type_number_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ class DataTypeNumberBase : public IDataType {
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 is_value_represented_by_integer() const override;
bool is_value_represented_by_unsigned_integer() const override;
bool is_value_unambiguously_represented_in_contiguous_memory_region() const override {
return true;
}
Expand Down
3 changes: 0 additions & 3 deletions be/src/vec/data_types/data_type_quantilestate.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,6 @@ class DataTypeQuantileState : public IDataType {
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 is_value_represented_by_number() const override { return false; }
bool is_value_represented_by_integer() const override { return false; }
bool is_value_represented_by_unsigned_integer() const override { return false; }
// TODO:
bool is_value_unambiguously_represented_in_contiguous_memory_region() const override {
return true;
Expand Down

0 comments on commit aa4318f

Please sign in to comment.