Clang-tidy detected problems

This commit is contained in:
Raúl Marín 2023-11-24 14:38:49 +01:00
parent 93893247cf
commit 829c2b2355
3 changed files with 6 additions and 5 deletions

View File

@ -9,7 +9,7 @@ struct Settings;
namespace
{
template <template <typename> class AggregateFunctionTemplate, template <typename, bool> class Data>
static IAggregateFunction * createAggregateFunctionSingleValueRespectNulls(
IAggregateFunction * createAggregateFunctionSingleValueRespectNulls(
const String & name, const DataTypes & argument_types, const Array & parameters, const Settings *)
{
assertNoParameters(name, parameters);

View File

@ -195,7 +195,7 @@ AggregateFunctionPtr AggregateFunctionFactory::getImpl(
{
auto opt = getAssociatedFunctionByNullsAction(is_case_insensitive ? case_insensitive_name : name, action);
if (opt)
found = std::move(*opt);
found = *opt;
out_properties = found.properties;
if (query_context && query_context->getSettingsRef().log_queries)

View File

@ -82,10 +82,11 @@ int main(int argc, char ** argv)
std::vector<Key> data(n);
Value value;
NullsAction action = NullsAction::EMPTY;
AggregateFunctionProperties properties;
AggregateFunctionPtr func_count = factory.get("count", data_types_empty, {}, properties);
AggregateFunctionPtr func_avg = factory.get("avg", data_types_uint64, {}, properties);
AggregateFunctionPtr func_uniq = factory.get("uniq", data_types_uint64, {}, properties);
AggregateFunctionPtr func_count = factory.get("count", action, data_types_empty, {}, properties);
AggregateFunctionPtr func_avg = factory.get("avg", action, data_types_uint64, {}, properties);
AggregateFunctionPtr func_uniq = factory.get("uniq", action, data_types_uint64, {}, properties);
#define INIT \
{ \