Skip to content
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

[Feature](datatype) Add IPv4/v6 data type for doris #24965

Merged
merged 14 commits into from
Oct 26, 2023
Prev Previous commit
Next Next commit
resolve conflicts
  • Loading branch information
sjyango committed Oct 26, 2023
commit 0b8ae229d0c29cf6be8f624b78950395ad235716
2 changes: 1 addition & 1 deletion be/src/olap/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const TypeInfo* get_scalar_type_info(FieldType field_type) {
get_scalar_type_info<FieldType::OLAP_FIELD_TYPE_AGG_STATE>(),
get_scalar_type_info<FieldType::OLAP_FIELD_TYPE_DECIMAL256>(),
get_scalar_type_info<FieldType::OLAP_FIELD_TYPE_IPV4>(),
get_scalar_type_info<FieldType::OLAP_FIELD_TYPE_IPV6>()
get_scalar_type_info<FieldType::OLAP_FIELD_TYPE_IPV6>(),
nullptr};
return field_type_array[int(field_type)];
}
Expand Down
9 changes: 9 additions & 0 deletions be/src/vec/core/extended_types.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,15 @@ concept is_integer =
std::is_integral_v<T> || std::is_same_v<T, Int256> || std::is_same_v<T, UInt256>;

namespace std {
// uint128_t and UInt128 are not compatible
template <>
struct make_unsigned<doris::vectorized::Int128> {
using type = doris::vectorized::Int128;
};
template <>
struct make_unsigned<doris::vectorized::UInt128> {
using type = doris::uint128_t;
};
template <>
struct make_unsigned<Int256> {
using type = UInt256;
Expand Down