mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Simplification of Nullable [#CLICKHOUSE-2]
This commit is contained in:
parent
c4a09a11f4
commit
4c67c3b171
@ -269,7 +269,9 @@ DataTypePtr getLeastCommonType(const DataTypes & types)
|
|||||||
/// Example, common of Int32, UInt32 = Int64.
|
/// Example, common of Int32, UInt32 = Int64.
|
||||||
|
|
||||||
size_t min_bit_width_of_integer = std::max(max_bits_of_signed_integer, max_bits_of_unsigned_integer);
|
size_t min_bit_width_of_integer = std::max(max_bits_of_signed_integer, max_bits_of_unsigned_integer);
|
||||||
if (max_bits_of_signed_integer == max_bits_of_unsigned_integer)
|
|
||||||
|
/// If unsigned is not covered by signed.
|
||||||
|
if (max_bits_of_signed_integer && max_bits_of_unsigned_integer >= max_bits_of_signed_integer)
|
||||||
++min_bit_width_of_integer;
|
++min_bit_width_of_integer;
|
||||||
|
|
||||||
/// If the result must be floating.
|
/// If the result must be floating.
|
||||||
|
@ -27,4 +27,4 @@ x Nullable(String)
|
|||||||
4 Nullable(String)
|
4 Nullable(String)
|
||||||
1 UInt8
|
1 UInt8
|
||||||
1 UInt8
|
1 UInt8
|
||||||
\N Null
|
\N Nullable(Nothing)
|
||||||
|
Loading…
Reference in New Issue
Block a user