mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 19:42:00 +00:00
Small improvement
This commit is contained in:
parent
b209893cd1
commit
a2997535e1
@ -286,8 +286,8 @@ public:
|
|||||||
serialize = [&](size_t col_idx, const Array & values)
|
serialize = [&](size_t col_idx, const Array & values)
|
||||||
{
|
{
|
||||||
const auto & type = values_types[col_idx];
|
const auto & type = values_types[col_idx];
|
||||||
if (isInteger(type))
|
if (!type->isNullable())
|
||||||
SerializationNumber<Int64>().serializeBinary(values[col_idx], buf);
|
type->promoteNumericType()->getDefaultSerialization()->serializeBinary(values[col_idx], buf);
|
||||||
else
|
else
|
||||||
values_serializations[col_idx]->serializeBinary(values[col_idx], buf);
|
values_serializations[col_idx]->serializeBinary(values[col_idx], buf);
|
||||||
};
|
};
|
||||||
@ -325,8 +325,8 @@ public:
|
|||||||
deserialize = [&](size_t col_idx, Array & values)
|
deserialize = [&](size_t col_idx, Array & values)
|
||||||
{
|
{
|
||||||
const auto & type = values_types[col_idx];
|
const auto & type = values_types[col_idx];
|
||||||
if (isInteger(type))
|
if (!type->isNullable())
|
||||||
SerializationNumber<Int64>().deserializeBinary(values[col_idx], buf);
|
type->promoteNumericType()->getDefaultSerialization()->deserializeBinary(values[col_idx], buf);
|
||||||
else
|
else
|
||||||
values_serializations[col_idx]->deserializeBinary(values[col_idx], buf);
|
values_serializations[col_idx]->deserializeBinary(values[col_idx], buf);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user