Simplification of Nullable [#CLICKHOUSE-2]

This commit is contained in:
Alexey Milovidov 2017-12-08 07:09:32 +03:00
parent c4a09a11f4
commit 4c67c3b171
2 changed files with 4 additions and 2 deletions

View File

@ -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.

View File

@ -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)