Fix tests

This commit is contained in:
Alexey Milovidov 2020-06-15 00:39:22 +03:00
parent 217d05443a
commit c4f18d2896
3 changed files with 2 additions and 4 deletions

View File

@ -117,7 +117,7 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
/// The case when aggregate function should return NULL on NULL arguments. This case is handled in "get" method.
if (!out_properties.returns_default_when_only_null
&& std::any_of(argument_types.begin(), argument_types.end(), [](const auto & type) { return type->onlyNull(); }))
&& std::any_of(argument_types.begin(), argument_types.end(), [](const auto & type) { return WhichDataType(type).isNothing(); }))
{
return nullptr;
}

View File

@ -57,8 +57,6 @@ public:
if (has_null_types)
{
std::cerr << properties.returns_default_when_only_null << "\n";
/// Currently the only functions that returns not-NULL on all NULL arguments are count and uniq, and they returns UInt64.
if (properties.returns_default_when_only_null)
return std::make_shared<AggregateFunctionNothing>(DataTypes{std::make_shared<DataTypeUInt64>()}, params);

View File

@ -1,4 +1,4 @@
SET send_logs_level = 'none';
SELECT arrayEnumerateUniq(anyHeavy([]), []);
SELECT arrayEnumerateDense([], [sequenceCount(NULL)]); -- { serverError 190 }
SELECT arrayEnumerateDense([], [sequenceCount(NULL)]); -- { serverError 42 }
SELECT arrayEnumerateDense([STDDEV_SAMP(NULL, 910947.571364)], [NULL]);