mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 07:31:57 +00:00
Remove support for depricated Object type in the encoding
This commit is contained in:
parent
1525dff4c3
commit
cbb850517f
@ -49,15 +49,14 @@ sidebar_label: Data types binary encoding specification.
|
||||
| `AggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN)` | `0x25<var_uint_version><var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N>` (see [aggregate function parameter binary encoding](#aggregate-function-parameter-binary-encoding)) |
|
||||
| `LowCardinality(T)` | `0x26<nested_type_encoding>` |
|
||||
| `Map(K, V)` | `0x27<key_type_encoding><value_type_encoding>` |
|
||||
| `Object('schema_format')` | `0x28<has_nullable_subcolumns_byte><var_uint_schema_format_size><schema_format_data>` |
|
||||
| `IPv4` | `0x29` |
|
||||
| `IPv6` | `0x2A` |
|
||||
| `Variant(T1, ..., TN)` | `0x2B<var_uint_number_of_variants><variant_type_encoding_1>...<variant_type_encoding_N>` |
|
||||
| `Dynamic(max_types=N)` | `0x2C<uint8_max_types>` |
|
||||
| `Custom type` (`Ring`, `Polygon`, etc) | `0x2D<var_uint_type_name_size><type_name_data>` |
|
||||
| `Bool` | `0x2E` |
|
||||
| `SimpleAggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN)` | `0x2F<var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N>` (see [aggregate function parameter binary encoding](#aggregate-function-parameter-binary-encoding)) |
|
||||
| `Nested(name1 T1, ..., nameN TN)` | `0x30<var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N>` |
|
||||
| `IPv4` | `0x28` |
|
||||
| `IPv6` | `0x29` |
|
||||
| `Variant(T1, ..., TN)` | `0x2A<var_uint_number_of_variants><variant_type_encoding_1>...<variant_type_encoding_N>` |
|
||||
| `Dynamic(max_types=N)` | `0x2B<uint8_max_types>` |
|
||||
| `Custom type` (`Ring`, `Polygon`, etc) | `0x2C<var_uint_type_name_size><type_name_data>` |
|
||||
| `Bool` | `0x2D` |
|
||||
| `SimpleAggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN)` | `0x2E<var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N>` (see [aggregate function parameter binary encoding](#aggregate-function-parameter-binary-encoding)) |
|
||||
| `Nested(name1 T1, ..., nameN TN)` | `0x2F<var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N>` |
|
||||
|
||||
|
||||
### Interval kind binary encoding
|
||||
|
@ -9,7 +9,6 @@
|
||||
#include <DataTypes/DataTypeFunction.h>
|
||||
#include <DataTypes/DataTypeLowCardinality.h>
|
||||
#include <DataTypes/DataTypeMap.h>
|
||||
#include <DataTypes/DataTypeObject.h>
|
||||
#include <DataTypes/DataTypeVariant.h>
|
||||
#include <DataTypes/DataTypeString.h>
|
||||
#include <DataTypes/DataTypeUUID.h>
|
||||
@ -87,15 +86,14 @@ enum class BinaryTypeIndex : uint8_t
|
||||
AggregateFunction = 0x25,
|
||||
LowCardinality = 0x26,
|
||||
Map = 0x27,
|
||||
Object = 0x28,
|
||||
IPv4 = 0x29,
|
||||
IPv6 = 0x2A,
|
||||
Variant = 0x2B,
|
||||
Dynamic = 0x2C,
|
||||
Custom = 0x2D,
|
||||
Bool = 0x2E,
|
||||
SimpleAggregateFunction = 0x2F,
|
||||
Nested = 0x30,
|
||||
IPv4 = 0x28,
|
||||
IPv6 = 0x29,
|
||||
Variant = 0x2A,
|
||||
Dynamic = 0x2B,
|
||||
Custom = 0x2C,
|
||||
Bool = 0x2D,
|
||||
SimpleAggregateFunction = 0x2E,
|
||||
Nested = 0x2F,
|
||||
};
|
||||
|
||||
BinaryTypeIndex getBinaryTypeIndex(const DataTypePtr & type)
|
||||
@ -205,7 +203,8 @@ BinaryTypeIndex getBinaryTypeIndex(const DataTypePtr & type)
|
||||
case TypeIndex::Map:
|
||||
return BinaryTypeIndex::Map;
|
||||
case TypeIndex::Object:
|
||||
return BinaryTypeIndex::Object;
|
||||
/// Object type will be deprecated and replaced by new implementation. No need to support it here.
|
||||
throw Exception(ErrorCodes::UNSUPPORTED_METHOD, "Binary encoding of type Object is not supported");
|
||||
case TypeIndex::IPv4:
|
||||
return BinaryTypeIndex::IPv4;
|
||||
case TypeIndex::IPv6:
|
||||
@ -433,13 +432,6 @@ void encodeDataType(const DataTypePtr & type, WriteBuffer & buf)
|
||||
encodeDataType(map_type.getValueType(), buf);
|
||||
break;
|
||||
}
|
||||
case BinaryTypeIndex::Object:
|
||||
{
|
||||
const auto & object_deprecated_type = assert_cast<const DataTypeObject &>(*type);
|
||||
writeBinary(object_deprecated_type.hasNullableSubcolumns(), buf);
|
||||
writeStringBinary(object_deprecated_type.getSchemaFormat(), buf);
|
||||
break;
|
||||
}
|
||||
case BinaryTypeIndex::Variant:
|
||||
{
|
||||
const auto & variant_type = assert_cast<const DataTypeVariant &>(*type);
|
||||
@ -644,14 +636,6 @@ DataTypePtr decodeDataType(ReadBuffer & buf)
|
||||
auto value_type = decodeDataType(buf);
|
||||
return std::make_shared<DataTypeMap>(key_type, value_type);
|
||||
}
|
||||
case BinaryTypeIndex::Object:
|
||||
{
|
||||
bool has_nullable_subcolumns;
|
||||
readBinary(has_nullable_subcolumns, buf);
|
||||
String schema_format;
|
||||
readStringBinary(schema_format, buf);
|
||||
return std::make_shared<DataTypeObject>(schema_format, has_nullable_subcolumns);
|
||||
}
|
||||
case BinaryTypeIndex::IPv4:
|
||||
return std::make_shared<DataTypeIPv4>();
|
||||
case BinaryTypeIndex::IPv6:
|
||||
|
@ -51,15 +51,14 @@ Binary encoding for ClickHouse data types:
|
||||
| AggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN) | 0x25<var_uint_version><var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N> |
|
||||
| LowCardinality(T) | 0x26<nested_type_encoding> |
|
||||
| Map(K, V) | 0x27<key_type_encoding><value_type_encoding> |
|
||||
| Object('schema_format') | 0x28<has_nullable_subcolumns_byte><var_uint_schema_format_size><schema_format_data> |
|
||||
| IPv4 | 0x29 |
|
||||
| IPv6 | 0x2A |
|
||||
| Variant(T1, ..., TN) | 0x2B<var_uint_number_of_variants><variant_type_encoding_1>...<variant_type_encoding_N> |
|
||||
| Dynamic(max_types=N) | 0x2C<uint8_max_types> |
|
||||
| Custom type (Ring, Polygon, etc) | 0x2D<var_uint_type_name_size><type_name_data> |
|
||||
| Bool | 0x2E |
|
||||
| SimpleAggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN) | 0x2F<var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N> |
|
||||
| Nested(name1 T1, ..., nameN TN) | 0x30<var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N> |
|
||||
| IPv4 | 0x28 |
|
||||
| IPv6 | 0x29 |
|
||||
| Variant(T1, ..., TN) | 0x2A<var_uint_number_of_variants><variant_type_encoding_1>...<variant_type_encoding_N> |
|
||||
| Dynamic(max_types=N) | 0x2B<uint8_max_types> |
|
||||
| Custom type (Ring, Polygon, etc) | 0x2C<var_uint_type_name_size><type_name_data> |
|
||||
| Bool | 0x2D |
|
||||
| SimpleAggregateFunction(function_name(param_1, ..., param_N), arg_T1, ..., arg_TN) | 0x2E<var_uint_function_name_size><function_name_data><var_uint_number_of_parameters><param_1>...<param_N><var_uint_number_of_arguments><argument_type_encoding_1>...<argument_type_encoding_N> |
|
||||
| Nested(name1 T1, ..., nameN TN) | 0x2F<var_uint_number_of_elements><var_uint_name_size_1><name_data_1><nested_type_encoding_1>...<var_uint_name_size_N><name_data_N><nested_type_encoding_N> |
|
||||
|------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
|
||||
Interval kind binary encoding:
|
||||
|
@ -6,7 +6,6 @@
|
||||
#include <DataTypes/DataTypeEnum.h>
|
||||
#include <DataTypes/DataTypesDecimal.h>
|
||||
#include <DataTypes/DataTypeFunction.h>
|
||||
#include <DataTypes/DataTypeObject.h>
|
||||
#include <DataTypes/DataTypeString.h>
|
||||
#include <DataTypes/DataTypeUUID.h>
|
||||
#include <DataTypes/DataTypeSet.h>
|
||||
|
Loading…
Reference in New Issue
Block a user