diff --git a/src/Common/FieldVisitors.cpp b/src/Common/FieldVisitors.cpp index e7eebaa14e3..13c2ae1653c 100644 --- a/src/Common/FieldVisitors.cpp +++ b/src/Common/FieldVisitors.cpp @@ -47,10 +47,10 @@ String FieldVisitorDump::operator() (const DecimalField & x) const { String FieldVisitorDump::operator() (const DecimalField & x) const { return formatQuotedWithPrefix(x, "Decimal64_"); } String FieldVisitorDump::operator() (const DecimalField & x) const { return formatQuotedWithPrefix(x, "Decimal128_"); } String FieldVisitorDump::operator() (const DecimalField & x) const { return formatQuotedWithPrefix(x, "Decimal256_"); } -String FieldVisitorDump::operator() (const UInt256 & x) const { return formatQuotedWithPrefix(x, "UInt256_"); } -String FieldVisitorDump::operator() (const Int256 & x) const { return formatQuotedWithPrefix(x, "Int256_"); } -String FieldVisitorDump::operator() (const Int128 & x) const { return formatQuotedWithPrefix(x, "Int128_"); } String FieldVisitorDump::operator() (const UInt128 & x) const { return formatQuotedWithPrefix(x, "UInt128_"); } +String FieldVisitorDump::operator() (const UInt256 & x) const { return formatQuotedWithPrefix(x, "UInt256_"); } +String FieldVisitorDump::operator() (const Int128 & x) const { return formatQuotedWithPrefix(x, "Int128_"); } +String FieldVisitorDump::operator() (const Int256 & x) const { return formatQuotedWithPrefix(x, "Int256_"); } String FieldVisitorDump::operator() (const String & x) const @@ -152,12 +152,9 @@ String FieldVisitorToString::operator() (const DecimalField & x) con String FieldVisitorToString::operator() (const DecimalField & x) const { return formatQuoted(x); } String FieldVisitorToString::operator() (const Int128 & x) const { return formatQuoted(x); } String FieldVisitorToString::operator() (const UInt128 & x) const { return formatQuoted(x); } -String FieldVisitorToString::operator() (const AggregateFunctionStateData & x) const -{ - return formatQuoted(x.data); -} String FieldVisitorToString::operator() (const UInt256 & x) const { return formatQuoted(x); } String FieldVisitorToString::operator() (const Int256 & x) const { return formatQuoted(x); } +String FieldVisitorToString::operator() (const AggregateFunctionStateData & x) const { return formatQuoted(x.data); } String FieldVisitorToString::operator() (const Array & x) const { diff --git a/src/Common/FieldVisitors.h b/src/Common/FieldVisitors.h index 5adbf2b01ac..75d055c2b7f 100644 --- a/src/Common/FieldVisitors.h +++ b/src/Common/FieldVisitors.h @@ -71,8 +71,10 @@ public: String operator() (const Null & x) const; String operator() (const UInt64 & x) const; String operator() (const UInt128 & x) const; + String operator() (const UInt256 & x) const; String operator() (const Int64 & x) const; String operator() (const Int128 & x) const; + String operator() (const Int256 & x) const; String operator() (const Float64 & x) const; String operator() (const String & x) const; String operator() (const Array & x) const; @@ -83,9 +85,6 @@ public: String operator() (const DecimalField & x) const; String operator() (const DecimalField & x) const; String operator() (const AggregateFunctionStateData & x) const; - - String operator() (const UInt256 & x) const; - String operator() (const Int256 & x) const; }; @@ -95,8 +94,10 @@ public: void operator() (const Null & x, WriteBuffer & buf) const; void operator() (const UInt64 & x, WriteBuffer & buf) const; void operator() (const UInt128 & x, WriteBuffer & buf) const; + void operator() (const UInt256 & x, WriteBuffer & buf) const; void operator() (const Int64 & x, WriteBuffer & buf) const; void operator() (const Int128 & x, WriteBuffer & buf) const; + void operator() (const Int256 & x, WriteBuffer & buf) const; void operator() (const Float64 & x, WriteBuffer & buf) const; void operator() (const String & x, WriteBuffer & buf) const; void operator() (const Array & x, WriteBuffer & buf) const; @@ -107,9 +108,6 @@ public: void operator() (const DecimalField & x, WriteBuffer & buf) const; void operator() (const DecimalField & x, WriteBuffer & buf) const; void operator() (const AggregateFunctionStateData & x, WriteBuffer & buf) const; - - void operator() (const UInt256 & x, WriteBuffer & buf) const; - void operator() (const Int256 & x, WriteBuffer & buf) const; }; @@ -120,8 +118,10 @@ public: String operator() (const Null & x) const; String operator() (const UInt64 & x) const; String operator() (const UInt128 & x) const; + String operator() (const UInt256 & x) const; String operator() (const Int64 & x) const; String operator() (const Int128 & x) const; + String operator() (const Int256 & x) const; String operator() (const Float64 & x) const; String operator() (const String & x) const; String operator() (const Array & x) const; @@ -132,9 +132,6 @@ public: String operator() (const DecimalField & x) const; String operator() (const DecimalField & x) const; String operator() (const AggregateFunctionStateData & x) const; - - String operator() (const UInt256 & x) const; - String operator() (const Int256 & x) const; }; @@ -259,8 +256,10 @@ public: void operator() (const Null & x) const; void operator() (const UInt64 & x) const; void operator() (const UInt128 & x) const; + void operator() (const UInt256 & x) const; void operator() (const Int64 & x) const; void operator() (const Int128 & x) const; + void operator() (const Int256 & x) const; void operator() (const Float64 & x) const; void operator() (const String & x) const; void operator() (const Array & x) const; @@ -271,9 +270,6 @@ public: void operator() (const DecimalField & x) const; void operator() (const DecimalField & x) const; void operator() (const AggregateFunctionStateData & x) const; - - void operator() (const UInt256 & x) const; - void operator() (const Int256 & x) const; }; diff --git a/src/Core/Field.h b/src/Core/Field.h index 4c35d048b62..26fd83b082a 100644 --- a/src/Core/Field.h +++ b/src/Core/Field.h @@ -453,8 +453,10 @@ public: case Types::Null: return false; case Types::UInt64: return get() < rhs.get(); case Types::UInt128: return get() < rhs.get(); + case Types::UInt256: return get() < rhs.get(); case Types::Int64: return get() < rhs.get(); case Types::Int128: return get() < rhs.get(); + case Types::Int256: return get() < rhs.get(); case Types::Float64: return get() < rhs.get(); case Types::String: return get() < rhs.get(); case Types::Array: return get() < rhs.get(); @@ -465,8 +467,6 @@ public: case Types::Decimal128: return get>() < rhs.get>(); case Types::Decimal256: return get>() < rhs.get>(); case Types::AggregateFunctionState: return get() < rhs.get(); - case Types::UInt256: return get() < rhs.get(); - case Types::Int256: return get() < rhs.get(); } throw Exception("Bad type of Field", ErrorCodes::BAD_TYPE_OF_FIELD); @@ -489,8 +489,10 @@ public: case Types::Null: return true; case Types::UInt64: return get() <= rhs.get(); case Types::UInt128: return get() <= rhs.get(); + case Types::UInt256: return get() <= rhs.get(); case Types::Int64: return get() <= rhs.get(); case Types::Int128: return get() <= rhs.get(); + case Types::Int256: return get() <= rhs.get(); case Types::Float64: return get() <= rhs.get(); case Types::String: return get() <= rhs.get(); case Types::Array: return get() <= rhs.get(); @@ -501,8 +503,6 @@ public: case Types::Decimal128: return get>() <= rhs.get>(); case Types::Decimal256: return get>() <= rhs.get>(); case Types::AggregateFunctionState: return get() <= rhs.get(); - case Types::UInt256: return get() <= rhs.get(); - case Types::Int256: return get() <= rhs.get(); } throw Exception("Bad type of Field", ErrorCodes::BAD_TYPE_OF_FIELD); @@ -535,14 +535,14 @@ public: case Types::Tuple: return get() == rhs.get(); case Types::Map: return get() == rhs.get(); case Types::UInt128: return get() == rhs.get(); + case Types::UInt256: return get() == rhs.get(); case Types::Int128: return get() == rhs.get(); + case Types::Int256: return get() == rhs.get(); case Types::Decimal32: return get>() == rhs.get>(); case Types::Decimal64: return get>() == rhs.get>(); case Types::Decimal128: return get>() == rhs.get>(); case Types::Decimal256: return get>() == rhs.get>(); case Types::AggregateFunctionState: return get() == rhs.get(); - case Types::UInt256: return get() == rhs.get(); - case Types::Int256: return get() == rhs.get(); } throw Exception("Bad type of Field", ErrorCodes::BAD_TYPE_OF_FIELD); @@ -568,7 +568,10 @@ public: #endif case Types::UInt64: return f(field.template get()); case Types::UInt128: return f(field.template get()); + case Types::UInt256: return f(field.template get()); case Types::Int64: return f(field.template get()); + case Types::Int128: return f(field.template get()); + case Types::Int256: return f(field.template get()); case Types::Float64: return f(field.template get()); case Types::String: return f(field.template get()); case Types::Array: return f(field.template get()); @@ -579,9 +582,6 @@ public: case Types::Decimal128: return f(field.template get>()); case Types::Decimal256: return f(field.template get>()); case Types::AggregateFunctionState: return f(field.template get()); - case Types::Int128: return f(field.template get()); - case Types::UInt256: return f(field.template get()); - case Types::Int256: return f(field.template get()); #if !defined(__clang__) #pragma GCC diagnostic pop #endif @@ -599,10 +599,9 @@ public: private: std::aligned_union_t, DecimalField, DecimalField, DecimalField, - AggregateFunctionStateData, - UInt256, Int256 + AggregateFunctionStateData > storage; Types::Which which; @@ -725,8 +724,10 @@ private: template <> struct Field::TypeToEnum { static const Types::Which value = Types::Null; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::UInt64; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::UInt128; }; +template <> struct Field::TypeToEnum { static const Types::Which value = Types::UInt256; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::Int64; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::Int128; }; +template <> struct Field::TypeToEnum { static const Types::Which value = Types::Int256; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::Float64; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::String; }; template <> struct Field::TypeToEnum { static const Types::Which value = Types::Array; }; @@ -738,14 +739,14 @@ template <> struct Field::TypeToEnum>{ static const Typ template <> struct Field::TypeToEnum>{ static const Types::Which value = Types::Decimal256; }; template <> struct Field::TypeToEnum>{ static const Types::Which value = Types::Decimal64; }; template <> struct Field::TypeToEnum{ static const Types::Which value = Types::AggregateFunctionState; }; -template <> struct Field::TypeToEnum { static const Types::Which value = Types::UInt256; }; -template <> struct Field::TypeToEnum { static const Types::Which value = Types::Int256; }; template <> struct Field::EnumToType { using Type = Null; }; template <> struct Field::EnumToType { using Type = UInt64; }; template <> struct Field::EnumToType { using Type = UInt128; }; +template <> struct Field::EnumToType { using Type = UInt256; }; template <> struct Field::EnumToType { using Type = Int64; }; template <> struct Field::EnumToType { using Type = Int128; }; +template <> struct Field::EnumToType { using Type = Int256; }; template <> struct Field::EnumToType { using Type = Float64; }; template <> struct Field::EnumToType { using Type = String; }; template <> struct Field::EnumToType { using Type = Array; }; @@ -756,8 +757,6 @@ template <> struct Field::EnumToType { using Type = Dec template <> struct Field::EnumToType { using Type = DecimalField; }; template <> struct Field::EnumToType { using Type = DecimalField; }; template <> struct Field::EnumToType { using Type = DecimalField; }; -template <> struct Field::EnumToType { using Type = UInt256; }; -template <> struct Field::EnumToType { using Type = Int256; }; inline constexpr bool isInt64FieldType(Field::Types::Which t) { diff --git a/src/Core/callOnTypeIndex.h b/src/Core/callOnTypeIndex.h index 2d6134ab9fc..520be263f9f 100644 --- a/src/Core/callOnTypeIndex.h +++ b/src/Core/callOnTypeIndex.h @@ -26,6 +26,7 @@ bool callOnBasicType(TypeIndex number, F && f) case TypeIndex::UInt16: return f(TypePair()); case TypeIndex::UInt32: return f(TypePair()); case TypeIndex::UInt64: return f(TypePair()); + case TypeIndex::UInt128: return f(TypePair()); case TypeIndex::UInt256: return f(TypePair()); case TypeIndex::Int8: return f(TypePair()); @@ -94,6 +95,7 @@ inline bool callOnBasicTypes(TypeIndex type_num1, TypeIndex type_num2, F && f) case TypeIndex::UInt16: return callOnBasicType(type_num2, std::forward(f)); case TypeIndex::UInt32: return callOnBasicType(type_num2, std::forward(f)); case TypeIndex::UInt64: return callOnBasicType(type_num2, std::forward(f)); + case TypeIndex::UInt128: return callOnBasicType(type_num2, std::forward(f)); case TypeIndex::UInt256: return callOnBasicType(type_num2, std::forward(f)); case TypeIndex::Int8: return callOnBasicType(type_num2, std::forward(f)); @@ -171,6 +173,7 @@ bool callOnIndexAndDataType(TypeIndex number, F && f, ExtraArgs && ... args) case TypeIndex::UInt16: return f(TypePair, T>(), std::forward(args)...); case TypeIndex::UInt32: return f(TypePair, T>(), std::forward(args)...); case TypeIndex::UInt64: return f(TypePair, T>(), std::forward(args)...); + case TypeIndex::UInt128: return f(TypePair, T>(), std::forward(args)...); case TypeIndex::UInt256: return f(TypePair, T>(), std::forward(args)...); case TypeIndex::Int8: return f(TypePair, T>(), std::forward(args)...); diff --git a/src/DataTypes/DataTypeNumberBase.cpp b/src/DataTypes/DataTypeNumberBase.cpp index a9df7db7334..12d1989a9d6 100644 --- a/src/DataTypes/DataTypeNumberBase.cpp +++ b/src/DataTypes/DataTypeNumberBase.cpp @@ -43,7 +43,7 @@ template class DataTypeNumberBase; template class DataTypeNumberBase; template class DataTypeNumberBase; template class DataTypeNumberBase; -template class DataTypeNumberBase; // base for UUID +template class DataTypeNumberBase; template class DataTypeNumberBase; template class DataTypeNumberBase; template class DataTypeNumberBase; diff --git a/src/DataTypes/DataTypeNumberBase.h b/src/DataTypes/DataTypeNumberBase.h index 46187f3248c..009ac487d84 100644 --- a/src/DataTypes/DataTypeNumberBase.h +++ b/src/DataTypes/DataTypeNumberBase.h @@ -62,7 +62,7 @@ extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; -extern template class DataTypeNumberBase; // base for UUID +extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; extern template class DataTypeNumberBase; diff --git a/src/DataTypes/FieldToDataType.h b/src/DataTypes/FieldToDataType.h index 39457564a2f..0fe757af0cc 100644 --- a/src/DataTypes/FieldToDataType.h +++ b/src/DataTypes/FieldToDataType.h @@ -20,8 +20,10 @@ public: DataTypePtr operator() (const Null & x) const; DataTypePtr operator() (const UInt64 & x) const; DataTypePtr operator() (const UInt128 & x) const; + DataTypePtr operator() (const UInt256 & x) const; DataTypePtr operator() (const Int64 & x) const; DataTypePtr operator() (const Int128 & x) const; + DataTypePtr operator() (const Int256 & x) const; DataTypePtr operator() (const Float64 & x) const; DataTypePtr operator() (const String & x) const; DataTypePtr operator() (const Array & x) const; @@ -32,8 +34,6 @@ public: DataTypePtr operator() (const DecimalField & x) const; DataTypePtr operator() (const DecimalField & x) const; DataTypePtr operator() (const AggregateFunctionStateData & x) const; - DataTypePtr operator() (const UInt256 & x) const; - DataTypePtr operator() (const Int256 & x) const; }; } diff --git a/src/DataTypes/IDataType.h b/src/DataTypes/IDataType.h index 5a676819b77..c18d79aa3b9 100644 --- a/src/DataTypes/IDataType.h +++ b/src/DataTypes/IDataType.h @@ -342,7 +342,7 @@ struct WhichDataType constexpr bool isFunction() const { return idx == TypeIndex::Function; } constexpr bool isAggregateFunction() const { return idx == TypeIndex::AggregateFunction; } - constexpr bool IsBigIntOrDeimal() const { return isInt128() || isInt256() || isUInt256() || isDecimal256(); } + constexpr bool IsBigIntOrDeimal() const { return isInt128() || isUInt128() || isInt256() || isUInt256() || isDecimal256(); } }; /// IDataType helpers (alternative for IDataType virtual methods with single point of truth) diff --git a/src/DataTypes/NumberTraits.h b/src/DataTypes/NumberTraits.h index 56e49302082..ce8ef6d3e91 100644 --- a/src/DataTypes/NumberTraits.h +++ b/src/DataTypes/NumberTraits.h @@ -46,7 +46,7 @@ template <> struct Construct { using Type = UInt8; }; template <> struct Construct { using Type = UInt16; }; template <> struct Construct { using Type = UInt32; }; template <> struct Construct { using Type = UInt64; }; -template <> struct Construct { using Type = UInt256; }; /// TODO: we cannot use our UInt128 here +template <> struct Construct { using Type = UInt128; }; template <> struct Construct { using Type = UInt256; }; template <> struct Construct { using Type = Float32; }; template <> struct Construct { using Type = Float32; }; diff --git a/src/DataTypes/Serializations/SerializationNumber.cpp b/src/DataTypes/Serializations/SerializationNumber.cpp index 36cbd6a5ef8..347db5d0aa5 100644 --- a/src/DataTypes/Serializations/SerializationNumber.cpp +++ b/src/DataTypes/Serializations/SerializationNumber.cpp @@ -157,7 +157,7 @@ template class SerializationNumber; template class SerializationNumber; template class SerializationNumber; template class SerializationNumber; -template class SerializationNumber; // base for UUID +template class SerializationNumber; template class SerializationNumber; template class SerializationNumber; template class SerializationNumber; diff --git a/src/DataTypes/getLeastSupertype.cpp b/src/DataTypes/getLeastSupertype.cpp index 6710313349b..40a1025f91a 100644 --- a/src/DataTypes/getLeastSupertype.cpp +++ b/src/DataTypes/getLeastSupertype.cpp @@ -390,6 +390,8 @@ DataTypePtr getLeastSupertype(const DataTypes & types) maximize(max_bits_of_unsigned_integer, 32); else if (typeid_cast(type.get())) maximize(max_bits_of_unsigned_integer, 64); + else if (typeid_cast(type.get())) + maximize(max_bits_of_unsigned_integer, 128); else if (typeid_cast(type.get())) maximize(max_bits_of_unsigned_integer, 256); else if (typeid_cast(type.get()) || typeid_cast(type.get())) @@ -482,6 +484,8 @@ DataTypePtr getLeastSupertype(const DataTypes & types) return std::make_shared(); else if (min_bit_width_of_integer <= 64) return std::make_shared(); + else if (min_bit_width_of_integer <= 128) + return std::make_shared(); else if (min_bit_width_of_integer <= 256) return std::make_shared(); else diff --git a/src/Functions/FunctionBinaryArithmetic.h b/src/Functions/FunctionBinaryArithmetic.h index 37531ecb787..7dea8076350 100644 --- a/src/Functions/FunctionBinaryArithmetic.h +++ b/src/Functions/FunctionBinaryArithmetic.h @@ -86,6 +86,7 @@ template <> inline constexpr bool IsIntegral = true; template <> inline constexpr bool IsIntegral = true; template constexpr bool IsExtended = false; +template <> inline constexpr bool IsExtended = true; template <> inline constexpr bool IsExtended = true; template <> inline constexpr bool IsExtended = true; template <> inline constexpr bool IsExtended = true; @@ -523,6 +524,7 @@ class FunctionBinaryArithmetic : public IFunction DataTypeUInt16, DataTypeUInt32, DataTypeUInt64, + DataTypeUInt128, DataTypeUInt256, DataTypeInt8, DataTypeInt16, @@ -550,6 +552,7 @@ class FunctionBinaryArithmetic : public IFunction DataTypeUInt16, DataTypeUInt32, DataTypeUInt64, + DataTypeUInt128, DataTypeUInt256, DataTypeInt8, DataTypeInt16, diff --git a/src/Functions/FunctionUnaryArithmetic.h b/src/Functions/FunctionUnaryArithmetic.h index 9145c4a2ec5..d1f2d333cd6 100644 --- a/src/Functions/FunctionUnaryArithmetic.h +++ b/src/Functions/FunctionUnaryArithmetic.h @@ -91,6 +91,7 @@ class FunctionUnaryArithmetic : public IFunction DataTypeUInt16, DataTypeUInt32, DataTypeUInt64, + DataTypeUInt128, DataTypeUInt256, DataTypeInt8, DataTypeInt16, diff --git a/src/Functions/array/arrayAggregation.cpp b/src/Functions/array/arrayAggregation.cpp index 8a1b3abe565..3d40dfe83ea 100644 --- a/src/Functions/array/arrayAggregation.cpp +++ b/src/Functions/array/arrayAggregation.cpp @@ -68,12 +68,13 @@ struct ArrayAggregateResultImpl { using Result = std::conditional_t, Int128, - std::conditional_t, Int256, - std::conditional_t, UInt256, - std::conditional_t, Decimal128, - std::conditional_t, Float64, - std::conditional_t, Int64, - UInt64>>>>>>; + std::conditional_t, UInt128, + std::conditional_t, Int256, + std::conditional_t, UInt256, + std::conditional_t, Decimal128, + std::conditional_t, Float64, + std::conditional_t, Int64, + UInt64>>>>>>>; }; template @@ -343,6 +344,7 @@ struct ArrayAggregateImpl executeType(mapped, offsets, res) || executeType(mapped, offsets, res) || executeType(mapped, offsets, res) || + executeType(mapped, offsets, res) || executeType(mapped, offsets, res) || executeType(mapped, offsets, res) || executeType(mapped, offsets, res) || diff --git a/src/Functions/reinterpretAs.cpp b/src/Functions/reinterpretAs.cpp index f8a7b8eec84..94c9eec5868 100644 --- a/src/Functions/reinterpretAs.cpp +++ b/src/Functions/reinterpretAs.cpp @@ -409,6 +409,7 @@ struct NameReinterpretAsUInt8 { static constexpr auto name = "reinterpretA struct NameReinterpretAsUInt16 { static constexpr auto name = "reinterpretAsUInt16"; }; struct NameReinterpretAsUInt32 { static constexpr auto name = "reinterpretAsUInt32"; }; struct NameReinterpretAsUInt64 { static constexpr auto name = "reinterpretAsUInt64"; }; +struct NameReinterpretAsUInt128 { static constexpr auto name = "reinterpretAsUInt128"; }; struct NameReinterpretAsUInt256 { static constexpr auto name = "reinterpretAsUInt256"; }; struct NameReinterpretAsInt8 { static constexpr auto name = "reinterpretAsInt8"; }; struct NameReinterpretAsInt16 { static constexpr auto name = "reinterpretAsInt16"; }; @@ -428,6 +429,7 @@ using FunctionReinterpretAsUInt8 = FunctionReinterpretAs; using FunctionReinterpretAsUInt32 = FunctionReinterpretAs; using FunctionReinterpretAsUInt64 = FunctionReinterpretAs; +using FunctionReinterpretAsUInt128 = FunctionReinterpretAs; using FunctionReinterpretAsUInt256 = FunctionReinterpretAs; using FunctionReinterpretAsInt8 = FunctionReinterpretAs; using FunctionReinterpretAsInt16 = FunctionReinterpretAs; @@ -453,6 +455,7 @@ void registerFunctionsReinterpretAs(FunctionFactory & factory) factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); + factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); factory.registerFunction(); diff --git a/src/IO/ReadHelpers.h b/src/IO/ReadHelpers.h index 885800ed02b..6dceda6c179 100644 --- a/src/IO/ReadHelpers.h +++ b/src/IO/ReadHelpers.h @@ -968,13 +968,8 @@ inline void readCSV(String & x, ReadBuffer & buf, const FormatSettings::CSV & se inline void readCSV(LocalDate & x, ReadBuffer & buf) { readCSVSimple(x, buf); } inline void readCSV(LocalDateTime & x, ReadBuffer & buf) { readCSVSimple(x, buf); } inline void readCSV(UUID & x, ReadBuffer & buf) { readCSVSimple(x, buf); } -[[noreturn]] inline void readCSV(UInt128 &, ReadBuffer &) -{ - /** Because UInt128 isn't a natural type, without arithmetic operator and only use as an intermediary type -for UUID- - * it should never arrive here. But because we used the DataTypeNumber class we should have at least a definition of it. - */ - throw Exception("UInt128 cannot be read as a text", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT); -} +inline void readCSV(UInt128 & x, ReadBuffer & buf) { readCSVSimple(x, buf); } +inline void readCSV(Int128 & x, ReadBuffer & buf) { readCSVSimple(x, buf); } inline void readCSV(UInt256 & x, ReadBuffer & buf) { readCSVSimple(x, buf); } inline void readCSV(Int256 & x, ReadBuffer & buf) { readCSVSimple(x, buf); }