Fixed compile issues

This commit is contained in:
Maksim Kita 2020-11-15 22:24:15 +03:00
parent 7b66dc374c
commit dd072a20c9
4 changed files with 9 additions and 3 deletions

View File

@ -16,12 +16,16 @@ namespace ErrorCodes
extern const int UNKNOWN_ELEMENT_IN_CONFIG; extern const int UNKNOWN_ELEMENT_IN_CONFIG;
} }
#if __clang__
#pragma clang diagnostic push #pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wframe-larger-than=" #pragma clang diagnostic ignored "-Wframe-larger-than="
#endif
IMPLEMENT_SETTINGS_TRAITS(SettingsTraits, LIST_OF_SETTINGS) IMPLEMENT_SETTINGS_TRAITS(SettingsTraits, LIST_OF_SETTINGS)
#if __clang__
#pragma clang diagnostic pop #pragma clang diagnostic pop
#endif
/** Set the settings from the profile (in the server configuration, many settings can be listed in one profile). /** Set the settings from the profile (in the server configuration, many settings can be listed in one profile).
* The profile can also be set using the `set` functions, like the `profile` setting. * The profile can also be set using the `set` functions, like the `profile` setting.

View File

@ -2135,7 +2135,8 @@ private:
bool is_accurate_cast = is_accurate_cast_or_null; bool is_accurate_cast = is_accurate_cast_or_null;
return [is_accurate_cast, nullable_column_wrapper, from_type_index, to_type] return [is_accurate_cast, nullable_column_wrapper, from_type_index, to_type]
(ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable * column_nullable, size_t input_rows_count) { (ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable *column_nullable, size_t input_rows_count)
{
ColumnPtr result_column; ColumnPtr result_column;
auto res = callOnIndexAndDataType<ToDataType>(from_type_index, [&](const auto & types) -> bool { auto res = callOnIndexAndDataType<ToDataType>(from_type_index, [&](const auto & types) -> bool {
using Types = std::decay_t<decltype(types)>; using Types = std::decay_t<decltype(types)>;

View File

@ -4,6 +4,7 @@
1 Nullable(Int32) 1 Nullable(Int32)
2 Nullable(Float32) 2 Nullable(Float32)
2 Nullable(UInt8) 2 Nullable(UInt8)
00000000-0000-0002-0000-000000000000 Nullable(UUID)
3 Nullable(Int32) 3 Nullable(Int32)
\N Nullable(Int32) \N Nullable(Int32)
42 Nullable(Int32) 42 Nullable(Int32)

View File

@ -10,7 +10,7 @@ SELECT CAST(toNullable(toInt8(1)) AS Int32) as x, toTypeName(x);
SELECT CAST(toNullable(toFloat32(2)), 'Float32') as x, toTypeName(x); SELECT CAST(toNullable(toFloat32(2)), 'Float32') as x, toTypeName(x);
SELECT CAST(toNullable(toFloat32(2)), 'UInt8') as x, toTypeName(x); SELECT CAST(toNullable(toFloat32(2)), 'UInt8') as x, toTypeName(x);
SELECT CAST(toNullable(toFloat32(2)), 'UUID') as x, toTypeName(x); -- { serverError 70 } SELECT CAST(toNullable(toFloat32(2)), 'UUID') as x, toTypeName(x);
SELECT CAST(if(1 = 1, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x); SELECT CAST(if(1 = 1, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x);
SELECT CAST(if(1 = 0, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x); SELECT CAST(if(1 = 0, toNullable(toInt8(3)), NULL) AS Int32) as x, toTypeName(x);