-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[Feature](datatype) Add IPv4/v6 data type for doris #24965
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
Changes from all commits
0b5f828
ddd410f
bb19475
f5ab18f
050900f
960c27e
8e0f586
af9cb70
a2810b8
4733eb5
ca9ac74
0b8ae22
958b020
1f9ffcc
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 | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -83,7 +83,7 @@ class TypeInfo { | |||||||||||||||||||||
|
|
||||||||||||||||||||||
| virtual void direct_copy(void* dest, const void* src) const = 0; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| // Use only in zone map to cut data. | ||||||||||||||||||||||
| // Use only in zone map to cut data.StringParser::string_to_unsigned_int<uint32_t> | ||||||||||||||||||||||
| virtual void direct_copy_may_cut(void* dest, const void* src) const = 0; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| virtual Status from_string(void* buf, const std::string& scan_key, const int precision = 0, | ||||||||||||||||||||||
|
|
@@ -722,6 +722,16 @@ struct CppTypeTraits<FieldType::OLAP_FIELD_TYPE_DATETIME> { | |||||||||||||||||||||
| using UnsignedCppType = uint64_t; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct CppTypeTraits<FieldType::OLAP_FIELD_TYPE_IPV4> { | ||||||||||||||||||||||
| using CppType = uint32_t; | ||||||||||||||||||||||
| using UnsignedCppType = uint32_t; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct CppTypeTraits<FieldType::OLAP_FIELD_TYPE_IPV6> { | ||||||||||||||||||||||
| using CppType = uint128_t; | ||||||||||||||||||||||
| using UnsignedCppType = uint128_t; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct CppTypeTraits<FieldType::OLAP_FIELD_TYPE_CHAR> { | ||||||||||||||||||||||
| using CppType = Slice; | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
@@ -778,6 +788,8 @@ struct BaseFieldtypeTraits : public CppTypeTraits<field_type> { | |||||||||||||||||||||
| static inline CppType get_cpp_type_value(const void* address) { | ||||||||||||||||||||||
| if constexpr (field_type == FieldType::OLAP_FIELD_TYPE_LARGEINT) { | ||||||||||||||||||||||
| return get_int128_from_unalign(address); | ||||||||||||||||||||||
| } else if constexpr (field_type == FieldType::OLAP_FIELD_TYPE_IPV6) { | ||||||||||||||||||||||
| return get_uint128_from_unalign(address); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| return *reinterpret_cast<const CppType*>(address); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
@@ -964,6 +976,101 @@ struct FieldTypeTraits<FieldType::OLAP_FIELD_TYPE_LARGEINT> | |||||||||||||||||||||
| } | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct FieldTypeTraits<FieldType::OLAP_FIELD_TYPE_IPV4> | ||||||||||||||||||||||
| : public BaseFieldtypeTraits<FieldType::OLAP_FIELD_TYPE_IPV4> { | ||||||||||||||||||||||
| static Status from_string(void* buf, const std::string& scan_key, const int precision, | ||||||||||||||||||||||
| const int scale) { | ||||||||||||||||||||||
| StringParser::ParseResult result = StringParser::PARSE_SUCCESS; | ||||||||||||||||||||||
| uint32_t value = StringParser::string_to_unsigned_int<uint32_t>(scan_key.c_str(), | ||||||||||||||||||||||
| scan_key.size(), &result); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (result == StringParser::PARSE_FAILURE) { | ||||||||||||||||||||||
| return Status::Error<ErrorCode::INVALID_ARGUMENT>( | ||||||||||||||||||||||
| "FieldTypeTraits<OLAP_FIELD_TYPE_IPV4>::from_string meet PARSE_FAILURE"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| *reinterpret_cast<uint32_t*>(buf) = value; | ||||||||||||||||||||||
| return Status::OK(); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| static std::string to_string(const void* src) { | ||||||||||||||||||||||
| uint32_t value = *reinterpret_cast<const uint32_t*>(src); | ||||||||||||||||||||||
| std::stringstream ss; | ||||||||||||||||||||||
| ss << ((value >> 24) & 0xFF) << '.' << ((value >> 16) & 0xFF) << '.' | ||||||||||||||||||||||
|
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. warning: 24 is a magic number; consider replacing it with a named constant [readability-magic-numbers] ss << ((value >> 24) & 0xFF) << '.' << ((value >> 16) & 0xFF) << '.'
^
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. warning: 0xFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] ss << ((value >> 24) & 0xFF) << '.' << ((value >> 16) & 0xFF) << '.'
^
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. warning: 16 is a magic number; consider replacing it with a named constant [readability-magic-numbers] ss << ((value >> 24) & 0xFF) << '.' << ((value >> 16) & 0xFF) << '.'
^
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. warning: 0xFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] ss << ((value >> 24) & 0xFF) << '.' << ((value >> 16) & 0xFF) << '.'
^ |
||||||||||||||||||||||
| << ((value >> 8) & 0xFF) << '.' << (value & 0xFF); | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] << ((value >> 8) & 0xFF) << '.' << (value & 0xFF);
^
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. warning: 0xFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] << ((value >> 8) & 0xFF) << '.' << (value & 0xFF);
^
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. warning: 0xFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] << ((value >> 8) & 0xFF) << '.' << (value & 0xFF);
^ |
||||||||||||||||||||||
| return ss.str(); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct FieldTypeTraits<FieldType::OLAP_FIELD_TYPE_IPV6> | ||||||||||||||||||||||
| : public BaseFieldtypeTraits<FieldType::OLAP_FIELD_TYPE_IPV6> { | ||||||||||||||||||||||
| static Status from_string(void* buf, const std::string& scan_key, const int precision, | ||||||||||||||||||||||
| const int scale) { | ||||||||||||||||||||||
| std::istringstream iss(scan_key); | ||||||||||||||||||||||
| std::string token; | ||||||||||||||||||||||
| uint128_t result = 0; | ||||||||||||||||||||||
| int count = 0; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| while (std::getline(iss, token, ':')) { | ||||||||||||||||||||||
| if (token.empty()) { | ||||||||||||||||||||||
| count += 8 - count; | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] count += 8 - count;
^ |
||||||||||||||||||||||
| break; | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] count += 8 - count;
^ |
||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (count > 8) { | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (count > 8) {
^ |
||||||||||||||||||||||
| return Status::Error<ErrorCode::INVALID_ARGUMENT>( | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (count > 8) {
^ |
||||||||||||||||||||||
| "FieldTypeTraits<OLAP_FIELD_TYPE_IPV6>::from_string meet PARSE_FAILURE"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| uint16_t value = 0; | ||||||||||||||||||||||
| std::istringstream ss(token); | ||||||||||||||||||||||
| if (!(ss >> std::hex >> value)) { | ||||||||||||||||||||||
| return Status::Error<ErrorCode::INVALID_ARGUMENT>( | ||||||||||||||||||||||
| "FieldTypeTraits<OLAP_FIELD_TYPE_IPV6>::from_string meet PARSE_FAILURE"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| result = (result << 16) | value; | ||||||||||||||||||||||
|
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. warning: 16 is a magic number; consider replacing it with a named constant [readability-magic-numbers] result = (result << 16) | value;
^ |
||||||||||||||||||||||
| count++; | ||||||||||||||||||||||
|
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. warning: 16 is a magic number; consider replacing it with a named constant [readability-magic-numbers] result = (result << 16) | value;
^ |
||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| if (count < 8) { | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (count < 8) {
^ |
||||||||||||||||||||||
| return Status::Error<ErrorCode::INVALID_ARGUMENT>( | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (count < 8) {
^ |
||||||||||||||||||||||
| "FieldTypeTraits<OLAP_FIELD_TYPE_IPV6>::from_string meet PARSE_FAILURE"); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| *reinterpret_cast<uint128_t*>(buf) = result; | ||||||||||||||||||||||
| return Status::OK(); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| static std::string to_string(const void* src) { | ||||||||||||||||||||||
| std::stringstream result; | ||||||||||||||||||||||
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
| uint128_t ipv6 = *reinterpret_cast<const uint128_t*>(src); | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| for (int i = 0; i < 8; i++) { | ||||||||||||||||||||||
|
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] for (int i = 0; i < 8; i++) {
^ |
||||||||||||||||||||||
| uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF); | ||||||||||||||||||||||
|
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. warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
Suggested change
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. warning: 112 is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^
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. warning: 16 is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^
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. warning: 0xFFFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^
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. warning: 8 is a magic number; consider replacing it with a named constant [readability-magic-numbers] for (int i = 0; i < 8; i++) {
^ |
||||||||||||||||||||||
| result << std::to_string(part); | ||||||||||||||||||||||
|
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. warning: use auto when initializing with a cast to avoid duplicating the type name [modernize-use-auto]
Suggested change
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. warning: 112 is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^
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. warning: 16 is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^
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. warning: 0xFFFF is a magic number; consider replacing it with a named constant [readability-magic-numbers] uint16_t part = static_cast<uint16_t>((ipv6 >> (112 - i * 16)) & 0xFFFF);
^ |
||||||||||||||||||||||
| if (i != 7) { | ||||||||||||||||||||||
|
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. warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (i != 7) {
^ |
||||||||||||||||||||||
| result << ":"; | ||||||||||||||||||||||
|
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. warning: 7 is a magic number; consider replacing it with a named constant [readability-magic-numbers] if (i != 7) {
^ |
||||||||||||||||||||||
| } | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| return result.str(); | ||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| static void set_to_max(void* buf) { | ||||||||||||||||||||||
| *reinterpret_cast<PackedInt128*>(buf) = | ||||||||||||||||||||||
| static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll + | ||||||||||||||||||||||
|
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. warning: 999999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 100000000000000000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||||||||||||||
| static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll; | ||||||||||||||||||||||
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
sjyango marked this conversation as resolved.
Show resolved
Hide resolved
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. warning: 1000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll;
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll;
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 999999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 100000000000000000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 1000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
|
||||||||||||||||||||||
| } | ||||||||||||||||||||||
|
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. warning: 99999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll;
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 1000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll;
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll;
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
|
||||||||||||||||||||||
|
|
||||||||||||||||||||||
| static void set_to_min(void* buf) { | ||||||||||||||||||||||
| *reinterpret_cast<PackedInt128*>(buf) = | ||||||||||||||||||||||
| -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll + | ||||||||||||||||||||||
|
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. warning: 999999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 100000000000000000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 1000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
|
||||||||||||||||||||||
| static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll); | ||||||||||||||||||||||
|
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. warning: 99999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll);
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 1000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll);
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] static_cast<int128_t>(99999999999999999ll) * 1000ll + 999ll);
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 999999999999999999ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^
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. warning: integer literal has suffix 'll', which is not uppercase [readability-uppercase-literal-suffix]
Suggested change
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. warning: 100000000000000000ll is a magic number; consider replacing it with a named constant [readability-magic-numbers] -(static_cast<int128_t>(999999999999999999ll) * 100000000000000000ll * 1000ll +
^ |
||||||||||||||||||||||
| } | ||||||||||||||||||||||
| }; | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| template <> | ||||||||||||||||||||||
| struct FieldTypeTraits<FieldType::OLAP_FIELD_TYPE_FLOAT> | ||||||||||||||||||||||
| : public NumericFieldtypeTraits<FieldType::OLAP_FIELD_TYPE_FLOAT, true> { | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.