mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 07:01:59 +00:00
Fix clang tidy after moving implementation to cpp
This commit is contained in:
parent
5286fa65c4
commit
dd90fbe13b
@ -347,7 +347,7 @@ ColumnWithTypeAndName ColumnFunction::reduce() const
|
||||
if (is_function_compiled)
|
||||
ProfileEvents::increment(ProfileEvents::CompiledFunctionExecute);
|
||||
|
||||
res.column = function->execute(columns, res.type, elements_size);
|
||||
res.column = function->execute(columns, res.type, elements_size, /* dry_run = */ false);
|
||||
if (res.column->getDataType() != res.type->getColumnType())
|
||||
throw Exception(
|
||||
ErrorCodes::LOGICAL_ERROR,
|
||||
|
@ -493,7 +493,7 @@ void buildConfigurationFromFunctionWithKeyValueArguments(
|
||||
/// We assume that function will not take arguments and will return constant value like tcpPort or hostName
|
||||
/// Such functions will return column with size equal to input_rows_count.
|
||||
size_t input_rows_count = 1;
|
||||
auto result = function->execute({}, function->getResultType(), input_rows_count);
|
||||
auto result = function->execute({}, function->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
|
||||
Field value;
|
||||
result->get(0, value);
|
||||
|
@ -1191,7 +1191,7 @@ class FunctionBinaryArithmetic : public IFunction
|
||||
new_arguments[1].type = std::make_shared<DataTypeNumber<DataTypeInterval::FieldType>>();
|
||||
|
||||
auto function = function_builder->build(new_arguments);
|
||||
return function->execute(new_arguments, result_type, input_rows_count);
|
||||
return function->execute(new_arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr executeDateTimeTupleOfIntervalsPlusMinus(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type,
|
||||
@ -1205,7 +1205,7 @@ class FunctionBinaryArithmetic : public IFunction
|
||||
|
||||
auto function = function_builder->build(new_arguments);
|
||||
|
||||
return function->execute(new_arguments, result_type, input_rows_count);
|
||||
return function->execute(new_arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr executeIntervalTupleOfIntervalsPlusMinus(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type,
|
||||
@ -1213,7 +1213,7 @@ class FunctionBinaryArithmetic : public IFunction
|
||||
{
|
||||
auto function = function_builder->build(arguments);
|
||||
|
||||
return function->execute(arguments, result_type, input_rows_count);
|
||||
return function->execute(arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr executeArraysImpl(const ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, size_t input_rows_count) const
|
||||
@ -1348,7 +1348,7 @@ class FunctionBinaryArithmetic : public IFunction
|
||||
|
||||
auto function = function_builder->build(new_arguments);
|
||||
|
||||
return function->execute(new_arguments, result_type, input_rows_count);
|
||||
return function->execute(new_arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
template <typename T, typename ResultDataType>
|
||||
@ -2250,7 +2250,7 @@ ColumnPtr executeStringInteger(const ColumnsWithTypeAndName & arguments, const A
|
||||
/// Special case when the function is plus, minus or multiply, both arguments are tuples.
|
||||
if (auto function_builder = getFunctionForTupleArithmetic(arguments[0].type, arguments[1].type, context))
|
||||
{
|
||||
return function_builder->build(arguments)->execute(arguments, result_type, input_rows_count);
|
||||
return function_builder->build(arguments)->execute(arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
/// Special case when the function is multiply or divide, one of arguments is Tuple and another is Number.
|
||||
|
@ -339,7 +339,7 @@ public:
|
||||
/// Special case when the function is negate, argument is tuple.
|
||||
if (auto function_builder = getFunctionForTupleArithmetic(arguments[0].type, context))
|
||||
{
|
||||
return function_builder->build(arguments)->execute(arguments, result_type, input_rows_count);
|
||||
return function_builder->build(arguments)->execute(arguments, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr result_column;
|
||||
|
@ -990,7 +990,7 @@ private:
|
||||
convolution_columns[i].type = impl->getResultType();
|
||||
|
||||
/// Comparison of the elements.
|
||||
convolution_columns[i].column = impl->execute(tmp_columns, impl->getResultType(), input_rows_count);
|
||||
convolution_columns[i].column = impl->execute(tmp_columns, impl->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
if (tuple_size == 1)
|
||||
@ -1001,7 +1001,7 @@ private:
|
||||
|
||||
/// Logical convolution.
|
||||
auto impl = func_convolution->build(convolution_columns);
|
||||
return impl->execute(convolution_columns, impl->getResultType(), input_rows_count);
|
||||
return impl->execute(convolution_columns, impl->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr executeTupleLessGreaterImpl(
|
||||
@ -1033,18 +1033,18 @@ private:
|
||||
{
|
||||
auto impl_head = func_compare_head->build(tmp_columns);
|
||||
less_columns[i].type = impl_head->getResultType();
|
||||
less_columns[i].column = impl_head->execute(tmp_columns, less_columns[i].type, input_rows_count);
|
||||
less_columns[i].column = impl_head->execute(tmp_columns, less_columns[i].type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto impl_equals = func_equals->build(tmp_columns);
|
||||
equal_columns[i].type = impl_equals->getResultType();
|
||||
equal_columns[i].column = impl_equals->execute(tmp_columns, equal_columns[i].type, input_rows_count);
|
||||
equal_columns[i].column = impl_equals->execute(tmp_columns, equal_columns[i].type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
auto impl_tail = func_compare_tail->build(tmp_columns);
|
||||
less_columns[i].type = impl_tail->getResultType();
|
||||
less_columns[i].column = impl_tail->execute(tmp_columns, less_columns[i].type, input_rows_count);
|
||||
less_columns[i].column = impl_tail->execute(tmp_columns, less_columns[i].type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1063,13 +1063,13 @@ private:
|
||||
tmp_columns[1] = equal_columns[i];
|
||||
auto func_and_adaptor = func_and->build(tmp_columns);
|
||||
|
||||
tmp_columns[0].column = func_and_adaptor->execute(tmp_columns, func_and_adaptor->getResultType(), input_rows_count);
|
||||
tmp_columns[0].column = func_and_adaptor->execute(tmp_columns, func_and_adaptor->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
tmp_columns[0].type = func_and_adaptor->getResultType();
|
||||
|
||||
tmp_columns[1] = less_columns[i];
|
||||
auto func_or_adaptor = func_or->build(tmp_columns);
|
||||
|
||||
tmp_columns[0].column = func_or_adaptor->execute(tmp_columns, func_or_adaptor->getResultType(), input_rows_count);
|
||||
tmp_columns[0].column = func_or_adaptor->execute(tmp_columns, func_or_adaptor->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
tmp_columns[tmp_columns.size() - 1].type = func_or_adaptor->getResultType();
|
||||
}
|
||||
|
||||
|
@ -3243,11 +3243,9 @@ private:
|
||||
{
|
||||
auto function_adaptor = std::make_unique<FunctionToOverloadResolverAdaptor>(function)->build({ColumnWithTypeAndName{nullptr, from_type, ""}});
|
||||
|
||||
return [function_adaptor]
|
||||
(ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable *, size_t input_rows_count)
|
||||
{
|
||||
return function_adaptor->execute(arguments, result_type, input_rows_count);
|
||||
};
|
||||
return [function_adaptor](
|
||||
ColumnsWithTypeAndName & arguments, const DataTypePtr & result_type, const ColumnNullable *, size_t input_rows_count)
|
||||
{ return function_adaptor->execute(arguments, result_type, input_rows_count, /* dry_run = */ false); };
|
||||
}
|
||||
|
||||
static WrapperType createToNullableColumnWrapper()
|
||||
|
@ -644,7 +644,7 @@ private:
|
||||
};
|
||||
|
||||
auto rows = mask_column->size();
|
||||
result_column = if_func->build(if_args)->execute(if_args, result_type, rows);
|
||||
result_column = if_func->build(if_args)->execute(if_args, result_type, rows, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ public:
|
||||
auto op_build = op->build(arguments);
|
||||
|
||||
auto res_type = op_build->getResultType();
|
||||
return op_build->execute(arguments, res_type, input_rows_count);
|
||||
return op_build->execute(arguments, res_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
const ColumnsWithTypeAndName & arguments,
|
||||
const DataTypePtr & result_type,
|
||||
size_t input_rows_count,
|
||||
bool dry_run = false) const;
|
||||
bool dry_run) const;
|
||||
|
||||
/// Get the main function name.
|
||||
virtual String getName() const = 0;
|
||||
|
@ -117,11 +117,11 @@ public:
|
||||
}
|
||||
|
||||
auto zipped
|
||||
= FunctionFactory::instance().get("arrayZip", context)->build(new_args)->execute(new_args, result_type, input_rows_count);
|
||||
= FunctionFactory::instance().get("arrayZip", context)->build(new_args)->execute(new_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
ColumnsWithTypeAndName sort_arg({{zipped, std::make_shared<DataTypeArray>(result_type), "zipped"}});
|
||||
auto sorted_tuple
|
||||
= FunctionFactory::instance().get(sort_function, context)->build(sort_arg)->execute(sort_arg, result_type, input_rows_count);
|
||||
= FunctionFactory::instance().get(sort_function, context)->build(sort_arg)->execute(sort_arg, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto null_type = std::make_shared<DataTypeNullable>(std::make_shared<DataTypeInt8>());
|
||||
|
||||
@ -140,7 +140,7 @@ public:
|
||||
{null_type->createColumnConstWithDefaultValue(input_rows_count), null_type, "NULL"},
|
||||
});
|
||||
|
||||
tuple_columns[i] = fun_array->build(null_array_arg)->execute(null_array_arg, arg_type, input_rows_count);
|
||||
tuple_columns[i] = fun_array->build(null_array_arg)->execute(null_array_arg, arg_type, input_rows_count, /* dry_run = */ false);
|
||||
tuple_columns[i] = tuple_columns[i]->convertToFullColumnIfConst();
|
||||
}
|
||||
else
|
||||
@ -151,7 +151,7 @@ public:
|
||||
auto tuple_coulmn = FunctionFactory::instance()
|
||||
.get("tupleElement", context)
|
||||
->build(untuple_args)
|
||||
->execute(untuple_args, result_type, input_rows_count);
|
||||
->execute(untuple_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto out_tmp = ColumnArray::create(nested_types[i]->createColumn());
|
||||
|
||||
@ -190,7 +190,7 @@ public:
|
||||
slice_index.column = FunctionFactory::instance()
|
||||
.get("indexOf", context)
|
||||
->build(indexof_args)
|
||||
->execute(indexof_args, result_type, input_rows_count);
|
||||
->execute(indexof_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto null_index_in_array = slice_index.column->get64(0);
|
||||
if (null_index_in_array > 0)
|
||||
@ -218,15 +218,15 @@ public:
|
||||
ColumnsWithTypeAndName slice_args_right(
|
||||
{{ColumnWithTypeAndName(tuple_columns[i], arg_type, "array")}, slice_index});
|
||||
ColumnWithTypeAndName arr_left{
|
||||
fun_slice->build(slice_args_left)->execute(slice_args_left, arg_type, input_rows_count), arg_type, ""};
|
||||
fun_slice->build(slice_args_left)->execute(slice_args_left, arg_type, input_rows_count, /* dry_run = */ false), arg_type, ""};
|
||||
ColumnWithTypeAndName arr_right{
|
||||
fun_slice->build(slice_args_right)->execute(slice_args_right, arg_type, input_rows_count), arg_type, ""};
|
||||
fun_slice->build(slice_args_right)->execute(slice_args_right, arg_type, input_rows_count, /* dry_run = */ false), arg_type, ""};
|
||||
|
||||
ColumnsWithTypeAndName arr_cancat({arr_right, arr_left});
|
||||
auto out_tmp = FunctionFactory::instance()
|
||||
.get("arrayConcat", context)
|
||||
->build(arr_cancat)
|
||||
->execute(arr_cancat, arg_type, input_rows_count);
|
||||
->execute(arr_cancat, arg_type, input_rows_count, /* dry_run = */ false);
|
||||
adjusted_columns[i] = std::move(out_tmp);
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ public:
|
||||
{DataTypeUInt8().createColumnConst(1, toField(UInt8(1))), std::make_shared<DataTypeUInt8>(), ""},
|
||||
{DataTypeUInt8().createColumnConst(1, toField(UInt8(2))), std::make_shared<DataTypeUInt8>(), ""}
|
||||
});
|
||||
auto if_res = FunctionFactory::instance().get("if", context)->build(if_columns)->execute(if_columns, std::make_shared<DataTypeUInt8>(), input_rows_count);
|
||||
auto if_res = FunctionFactory::instance().get("if", context)->build(if_columns)->execute(if_columns, std::make_shared<DataTypeUInt8>(), input_rows_count, /* dry_run = */ false);
|
||||
auto result = if_res->getUInt(0);
|
||||
return (result == 1);
|
||||
}
|
||||
|
@ -339,7 +339,7 @@ static ColumnPtr callFunctionNotEquals(ColumnWithTypeAndName first, ColumnWithTy
|
||||
{
|
||||
ColumnsWithTypeAndName args{first, second};
|
||||
auto eq_func = FunctionFactory::instance().get("notEquals", context)->build(args);
|
||||
return eq_func->execute(args, eq_func->getResultType(), args.front().column->size());
|
||||
return eq_func->execute(args, eq_func->getResultType(), args.front().column->size(), /* dry_run = */ false);
|
||||
}
|
||||
|
||||
template <typename Mode>
|
||||
|
@ -113,7 +113,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName intersect_column;
|
||||
intersect_column.type = intersect_array->getResultType();
|
||||
intersect_column.column = intersect_array->execute(arguments, intersect_column.type, input_rows_count);
|
||||
intersect_column.column = intersect_array->execute(arguments, intersect_column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
const auto * intersect_column_type = checkAndGetDataType<DataTypeArray>(intersect_column.type.get());
|
||||
if (!intersect_column_type)
|
||||
|
@ -93,12 +93,12 @@ public:
|
||||
|
||||
auto fun_array = FunctionFactory::instance().get("array", context);
|
||||
|
||||
src_array_col.column = fun_array->build(src_array_elems)->execute(src_array_elems, src_array_type, input_rows_count);
|
||||
dst_array_col.column = fun_array->build(dst_array_elems)->execute(dst_array_elems, dst_array_type, input_rows_count);
|
||||
src_array_col.column = fun_array->build(src_array_elems)->execute(src_array_elems, src_array_type, input_rows_count, /* dry_run = */ false);
|
||||
dst_array_col.column = fun_array->build(dst_array_elems)->execute(dst_array_elems, dst_array_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
/// Execute transform.
|
||||
ColumnsWithTypeAndName transform_args{args.front(), src_array_col, dst_array_col, args.back()};
|
||||
return FunctionFactory::instance().get("transform", context)->build(transform_args)->execute(transform_args, result_type, input_rows_count);
|
||||
return FunctionFactory::instance().get("transform", context)->build(transform_args)->execute(transform_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -133,11 +133,11 @@ public:
|
||||
{
|
||||
tmp_args[0] = filtered_args[i];
|
||||
auto & cond = multi_if_args.emplace_back(ColumnWithTypeAndName{nullptr, std::make_shared<DataTypeUInt8>(), ""});
|
||||
cond.column = is_not_null->build(tmp_args)->execute(tmp_args, cond.type, input_rows_count);
|
||||
cond.column = is_not_null->build(tmp_args)->execute(tmp_args, cond.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
tmp_args[0] = filtered_args[i];
|
||||
auto & val = multi_if_args.emplace_back(ColumnWithTypeAndName{nullptr, removeNullable(filtered_args[i].type), ""});
|
||||
val.column = assume_not_null->build(tmp_args)->execute(tmp_args, val.type, input_rows_count);
|
||||
val.column = assume_not_null->build(tmp_args)->execute(tmp_args, val.type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -152,7 +152,7 @@ public:
|
||||
/// use function "if" instead, because it's implemented more efficient.
|
||||
/// TODO: make "multiIf" the same efficient.
|
||||
FunctionOverloadResolverPtr if_or_multi_if = multi_if_args.size() == 3 ? if_function : multi_if_function;
|
||||
ColumnPtr res = if_or_multi_if->build(multi_if_args)->execute(multi_if_args, result_type, input_rows_count);
|
||||
ColumnPtr res = if_or_multi_if->build(multi_if_args)->execute(multi_if_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
/// if last argument is not nullable, result should be also not nullable
|
||||
if (!multi_if_args.back().column->isNullable() && res->isNullable())
|
||||
|
@ -151,10 +151,10 @@ public:
|
||||
auto to_start_of_interval = FunctionFactory::instance().get("toStartOfInterval", context);
|
||||
|
||||
if (arguments.size() == 2)
|
||||
return to_start_of_interval->build(temp_columns)->execute(temp_columns, result_type, input_rows_count);
|
||||
return to_start_of_interval->build(temp_columns)->execute(temp_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
temp_columns[2] = arguments[2];
|
||||
return to_start_of_interval->build(temp_columns)->execute(temp_columns, result_type, input_rows_count);
|
||||
return to_start_of_interval->build(temp_columns)->execute(temp_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
bool hasInformationAboutMonotonicity() const override
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
{
|
||||
ColumnsWithTypeAndName is_finite_columns{arguments[0]};
|
||||
auto is_finite = FunctionFactory::instance().get("isFinite", context)->build(is_finite_columns);
|
||||
auto res = is_finite->execute(is_finite_columns, is_finite->getResultType(), input_rows_count);
|
||||
auto res = is_finite->execute(is_finite_columns, is_finite->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
|
||||
ColumnsWithTypeAndName if_columns
|
||||
{
|
||||
@ -55,7 +55,7 @@ public:
|
||||
};
|
||||
|
||||
auto func_if = FunctionFactory::instance().get("if", context)->build(if_columns);
|
||||
return func_if->execute(if_columns, result_type, input_rows_count);
|
||||
return func_if->execute(if_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -66,11 +66,11 @@ public:
|
||||
|
||||
auto is_not_null = FunctionFactory::instance().get("isNotNull", context)->build(columns);
|
||||
auto is_not_null_type = std::make_shared<DataTypeUInt8>();
|
||||
auto is_not_null_res = is_not_null->execute(columns, is_not_null_type, input_rows_count);
|
||||
auto is_not_null_res = is_not_null->execute(columns, is_not_null_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto assume_not_null = FunctionFactory::instance().get("assumeNotNull", context)->build(columns);
|
||||
auto assume_not_null_type = removeNullable(arguments[0].type);
|
||||
auto assume_nut_null_res = assume_not_null->execute(columns, assume_not_null_type, input_rows_count);
|
||||
auto assume_nut_null_res = assume_not_null->execute(columns, assume_not_null_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
ColumnsWithTypeAndName if_columns
|
||||
{
|
||||
@ -80,7 +80,7 @@ public:
|
||||
};
|
||||
|
||||
auto func_if = FunctionFactory::instance().get("if", context)->build(if_columns);
|
||||
return func_if->execute(if_columns, result_type, input_rows_count);
|
||||
return func_if->execute(if_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -133,13 +133,13 @@ public:
|
||||
const DataTypePtr & value_array_type = std::make_shared<DataTypeArray>(value_type);
|
||||
|
||||
/// key_array = array(args[0], args[2]...)
|
||||
ColumnPtr key_array = function_array->build(key_args)->execute(key_args, key_array_type, input_rows_count);
|
||||
ColumnPtr key_array = function_array->build(key_args)->execute(key_args, key_array_type, input_rows_count, /* dry_run = */ false);
|
||||
/// value_array = array(args[1], args[3]...)
|
||||
ColumnPtr value_array = function_array->build(value_args)->execute(value_args, value_array_type, input_rows_count);
|
||||
ColumnPtr value_array = function_array->build(value_args)->execute(value_args, value_array_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
/// result = mapFromArrays(key_array, value_array)
|
||||
ColumnsWithTypeAndName map_args{{key_array, key_array_type, ""}, {value_array, value_array_type, ""}};
|
||||
return function_map_from_arrays->build(map_args)->execute(map_args, result_type, input_rows_count);
|
||||
return function_map_from_arrays->build(map_args)->execute(map_args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -70,7 +70,7 @@ public:
|
||||
};
|
||||
|
||||
auto date_name_func = function_resolver->build(temporary_columns);
|
||||
return date_name_func->execute(temporary_columns, result_type, input_rows_count);
|
||||
return date_name_func->execute(temporary_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -49,7 +49,7 @@ public:
|
||||
/// nullIf(col1, col2) == if(col1 = col2, NULL, col1)
|
||||
|
||||
auto equals_func = FunctionFactory::instance().get("equals", context)->build(arguments);
|
||||
auto eq_res = equals_func->execute(arguments, equals_func->getResultType(), input_rows_count);
|
||||
auto eq_res = equals_func->execute(arguments, equals_func->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
|
||||
ColumnsWithTypeAndName if_columns
|
||||
{
|
||||
@ -59,7 +59,7 @@ public:
|
||||
};
|
||||
|
||||
auto func_if = FunctionFactory::instance().get("if", context)->build(if_columns);
|
||||
auto if_res = func_if->execute(if_columns, result_type, input_rows_count);
|
||||
auto if_res = func_if->execute(if_columns, result_type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
return makeNullable(if_res);
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
auto res = function_concat->build(concat_args)->execute(concat_args, std::make_shared<DataTypeString>(), input_rows_count);
|
||||
auto res = function_concat->build(concat_args)->execute(concat_args, std::make_shared<DataTypeString>(), input_rows_count, /* dry_run = */ false);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ namespace
|
||||
};
|
||||
|
||||
auto func_cast = createInternalCast(arguments[0], result_type, CastType::nonAccurate, {});
|
||||
return func_cast->execute(cast_args, result_type, arguments[0].column->size());
|
||||
return func_cast->execute(cast_args, result_type, arguments[0].column->size(), /* dry_run = */ false);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -214,7 +214,7 @@ namespace
|
||||
|
||||
auto impl = std::make_shared<FunctionToOverloadResolverAdaptor>(std::make_shared<FunctionTransform>())->build(args);
|
||||
|
||||
return impl->execute(args, result_type, input_rows_count);
|
||||
return impl->execute(args, result_type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
|
||||
void executeAnything(const IColumn * in, IColumn & column_result, const ColumnPtr default_non_const, const IColumn & in_casted, size_t input_rows_count) const
|
||||
|
@ -119,7 +119,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_compare->getResultType();
|
||||
column.column = elem_compare->execute({left, right}, column.type, input_rows_count);
|
||||
column.column = elem_compare->execute({left, right}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -129,7 +129,7 @@ public:
|
||||
{
|
||||
auto plus_elem = plus->build({res, column});
|
||||
auto res_type = plus_elem->getResultType();
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ public:
|
||||
ColumnWithTypeAndName left{left_elements[i], left_types[i], {}};
|
||||
ColumnWithTypeAndName right{right_elements[i], right_types[i], {}};
|
||||
auto elem_func = func->build(ColumnsWithTypeAndName{left, right});
|
||||
columns[i] = elem_func->execute({left, right}, elem_func->getResultType(), input_rows_count)
|
||||
columns[i] = elem_func->execute({left, right}, elem_func->getResultType(), input_rows_count, /* dry_run = */ false)
|
||||
->convertToFullColumnIfConst();
|
||||
}
|
||||
|
||||
@ -221,7 +221,7 @@ public:
|
||||
{
|
||||
ColumnWithTypeAndName cur{cur_elements[i], cur_types[i], {}};
|
||||
auto elem_negate = negate->build(ColumnsWithTypeAndName{cur});
|
||||
columns[i] = elem_negate->execute({cur}, elem_negate->getResultType(), input_rows_count)
|
||||
columns[i] = elem_negate->execute({cur}, elem_negate->getResultType(), input_rows_count, /* dry_run = */ false)
|
||||
->convertToFullColumnIfConst();
|
||||
}
|
||||
|
||||
@ -295,7 +295,7 @@ public:
|
||||
{
|
||||
ColumnWithTypeAndName cur{cur_elements[i], cur_types[i], {}};
|
||||
auto elem_func = func->build(ColumnsWithTypeAndName{cur, p_column});
|
||||
columns[i] = elem_func->execute({cur, p_column}, elem_func->getResultType(), input_rows_count)
|
||||
columns[i] = elem_func->execute({cur, p_column}, elem_func->getResultType(), input_rows_count, /* dry_run = */ false)
|
||||
->convertToFullColumnIfConst();
|
||||
}
|
||||
|
||||
@ -413,7 +413,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_multiply->getResultType();
|
||||
column.column = elem_multiply->execute({left, right}, column.type, input_rows_count);
|
||||
column.column = elem_multiply->execute({left, right}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -423,7 +423,7 @@ public:
|
||||
{
|
||||
auto plus_elem = plus->build({res, column});
|
||||
auto res_type = plus_elem->getResultType();
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
@ -510,7 +510,7 @@ public:
|
||||
ColumnWithTypeAndName column{cur_elements[i], cur_types[i], {}};
|
||||
auto elem_plus = plus->build(ColumnsWithTypeAndName{i == 0 ? arguments[0] : res, column});
|
||||
auto res_type = elem_plus->getResultType();
|
||||
res.column = elem_plus->execute({i == 0 ? arguments[0] : res, column}, res_type, input_rows_count);
|
||||
res.column = elem_plus->execute({i == 0 ? arguments[0] : res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
|
||||
@ -665,14 +665,14 @@ public:
|
||||
{
|
||||
auto minus = FunctionFactory::instance().get("minus", context);
|
||||
auto elem_minus = minus->build({left, arguments[1]});
|
||||
last_column = elem_minus->execute({left, arguments[1]}, arguments[1].type, input_rows_count)
|
||||
last_column = elem_minus->execute({left, arguments[1]}, arguments[1].type, input_rows_count, /* dry_run = */ false)
|
||||
->convertToFullColumnIfConst();
|
||||
}
|
||||
else
|
||||
{
|
||||
auto plus = FunctionFactory::instance().get("plus", context);
|
||||
auto elem_plus = plus->build({left, arguments[1]});
|
||||
last_column = elem_plus->execute({left, arguments[1]}, arguments[1].type, input_rows_count)
|
||||
last_column = elem_plus->execute({left, arguments[1]}, arguments[1].type, input_rows_count, /* dry_run = */ false)
|
||||
->convertToFullColumnIfConst();
|
||||
}
|
||||
}
|
||||
@ -682,7 +682,7 @@ public:
|
||||
{
|
||||
auto negate = FunctionFactory::instance().get("negate", context);
|
||||
auto elem_negate = negate->build({arguments[1]});
|
||||
last_column = elem_negate->execute({arguments[1]}, arguments[1].type, input_rows_count);
|
||||
last_column = elem_negate->execute({arguments[1]}, arguments[1].type, input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -783,7 +783,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_abs->getResultType();
|
||||
column.column = elem_abs->execute({cur}, column.type, input_rows_count);
|
||||
column.column = elem_abs->execute({cur}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -793,7 +793,7 @@ public:
|
||||
{
|
||||
auto plus_elem = plus->build({res, column});
|
||||
auto res_type = plus_elem->getResultType();
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
@ -885,7 +885,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_multiply->getResultType();
|
||||
column.column = elem_multiply->execute({cur, cur}, column.type, input_rows_count);
|
||||
column.column = elem_multiply->execute({cur, cur}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -895,7 +895,7 @@ public:
|
||||
{
|
||||
auto plus_elem = plus->build({res, column});
|
||||
auto res_type = plus_elem->getResultType();
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
@ -949,7 +949,7 @@ public:
|
||||
|
||||
auto sqrt = FunctionFactory::instance().get("sqrt", context);
|
||||
auto sqrt_elem = sqrt->build({squared_res});
|
||||
return sqrt_elem->execute({squared_res}, sqrt_elem->getResultType(), input_rows_count);
|
||||
return sqrt_elem->execute({squared_res}, sqrt_elem->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
};
|
||||
using FunctionL2Norm = FunctionLNorm<L2Label>;
|
||||
@ -1036,7 +1036,7 @@ public:
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_abs->getResultType();
|
||||
column.column = elem_abs->execute({cur}, column.type, input_rows_count);
|
||||
column.column = elem_abs->execute({cur}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -1046,7 +1046,7 @@ public:
|
||||
{
|
||||
auto max_elem = max->build({res, column});
|
||||
auto res_type = max_elem->getResultType();
|
||||
res.column = max_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = max_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
@ -1163,14 +1163,14 @@ public:
|
||||
{
|
||||
ColumnWithTypeAndName cur{cur_elements[i], cur_types[i], {}};
|
||||
auto elem_abs = abs->build(ColumnsWithTypeAndName{cur});
|
||||
cur.column = elem_abs->execute({cur}, elem_abs->getResultType(), input_rows_count);
|
||||
cur.column = elem_abs->execute({cur}, elem_abs->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
cur.type = elem_abs->getResultType();
|
||||
|
||||
auto elem_pow = pow->build(ColumnsWithTypeAndName{cur, p_column});
|
||||
|
||||
ColumnWithTypeAndName column;
|
||||
column.type = elem_pow->getResultType();
|
||||
column.column = elem_pow->execute({cur, p_column}, column.type, input_rows_count);
|
||||
column.column = elem_pow->execute({cur, p_column}, column.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
if (i == 0)
|
||||
{
|
||||
@ -1180,7 +1180,7 @@ public:
|
||||
{
|
||||
auto plus_elem = plus->build({res, column});
|
||||
auto res_type = plus_elem->getResultType();
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count);
|
||||
res.column = plus_elem->execute({res, column}, res_type, input_rows_count, /* dry_run = */ false);
|
||||
res.type = res_type;
|
||||
}
|
||||
}
|
||||
@ -1188,7 +1188,7 @@ public:
|
||||
ColumnWithTypeAndName inv_p_column{DataTypeFloat64().createColumnConst(input_rows_count, 1 / p),
|
||||
std::make_shared<DataTypeFloat64>(), {}};
|
||||
auto pow_elem = pow->build({res, inv_p_column});
|
||||
return pow_elem->execute({res, inv_p_column}, pow_elem->getResultType(), input_rows_count);
|
||||
return pow_elem->execute({res, inv_p_column}, pow_elem->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
};
|
||||
using FunctionLpNorm = FunctionLNorm<LpLabel>;
|
||||
@ -1247,12 +1247,12 @@ public:
|
||||
if constexpr (FuncLabel::name[0] == 'p')
|
||||
{
|
||||
auto func_elem = func->build({minus_res, arguments[2]});
|
||||
return func_elem->execute({minus_res, arguments[2]}, func_elem->getResultType(), input_rows_count);
|
||||
return func_elem->execute({minus_res, arguments[2]}, func_elem->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
else
|
||||
{
|
||||
auto func_elem = func->build({minus_res});
|
||||
return func_elem->execute({minus_res}, func_elem->getResultType(), input_rows_count);
|
||||
return func_elem->execute({minus_res}, func_elem->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -1394,16 +1394,16 @@ public:
|
||||
ColumnWithTypeAndName multiply_result;
|
||||
multiply_result.type = multiply_elem->getResultType();
|
||||
multiply_result.column = multiply_elem->execute({first_norm, second_norm},
|
||||
multiply_result.type, input_rows_count);
|
||||
multiply_result.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto divide_elem = divide->build({dot_result, multiply_result});
|
||||
ColumnWithTypeAndName divide_result;
|
||||
divide_result.type = divide_elem->getResultType();
|
||||
divide_result.column = divide_elem->execute({dot_result, multiply_result},
|
||||
divide_result.type, input_rows_count);
|
||||
divide_result.type, input_rows_count, /* dry_run = */ false);
|
||||
|
||||
auto minus_elem = minus->build({one, divide_result});
|
||||
return minus_elem->execute({one, divide_result}, minus_elem->getResultType(), input_rows_count);
|
||||
return minus_elem->execute({one, divide_result}, minus_elem->getResultType(), input_rows_count, /* dry_run = */ false);
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -167,7 +167,7 @@ ArrayJoinResultIterator::ArrayJoinResultIterator(const ArrayJoinAction * array_j
|
||||
|
||||
ColumnWithTypeAndName array_col = convertArrayJoinColumn(src_col);
|
||||
ColumnsWithTypeAndName tmp_block{array_col}; //, {{}, uint64, {}}};
|
||||
auto len_col = function_length->build(tmp_block)->execute(tmp_block, uint64, rows);
|
||||
auto len_col = function_length->build(tmp_block)->execute(tmp_block, uint64, rows, /* dry_run = */ false);
|
||||
updateMaxLength(*max_length, *len_col);
|
||||
}
|
||||
|
||||
@ -178,7 +178,7 @@ ArrayJoinResultIterator::ArrayJoinResultIterator(const ArrayJoinAction * array_j
|
||||
|
||||
ColumnWithTypeAndName array_col = convertArrayJoinColumn(src_col);
|
||||
ColumnsWithTypeAndName tmp_block{array_col, column_of_max_length};
|
||||
array_col.column = function_array_resize->build(tmp_block)->execute(tmp_block, array_col.type, rows);
|
||||
array_col.column = function_array_resize->build(tmp_block)->execute(tmp_block, array_col.type, rows, /* dry_run = */ false);
|
||||
|
||||
src_col = std::move(array_col);
|
||||
any_array_map_ptr = src_col.column->convertToFullColumnIfConst();
|
||||
@ -195,7 +195,7 @@ ArrayJoinResultIterator::ArrayJoinResultIterator(const ArrayJoinAction * array_j
|
||||
const auto & src_col = block.getByName(name);
|
||||
ColumnWithTypeAndName array_col = convertArrayJoinColumn(src_col);
|
||||
ColumnsWithTypeAndName tmp_block{array_col};
|
||||
non_empty_array_columns[name] = function_builder->build(tmp_block)->execute(tmp_block, array_col.type, array_col.column->size());
|
||||
non_empty_array_columns[name] = function_builder->build(tmp_block)->execute(tmp_block, array_col.type, array_col.column->size(), /* dry_run = */ false);
|
||||
}
|
||||
|
||||
any_array_map_ptr = non_empty_array_columns.begin()->second->convertToFullColumnIfConst();
|
||||
|
@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
const auto & type = function.getArgumentTypes().at(0);
|
||||
ColumnsWithTypeAndName args{{type->createColumnConst(1, value), type, "x" }};
|
||||
auto col = function.execute(args, function.getResultType(), 1);
|
||||
auto col = function.execute(args, function.getResultType(), 1, /* dry_run = */ false);
|
||||
col->get(0, value);
|
||||
}
|
||||
|
||||
|
@ -34,8 +34,8 @@ static ColumnPtr castColumn(CastType cast_type, const ColumnWithTypeAndName & ar
|
||||
FunctionBasePtr func_cast = cache ? cache->getOrSet(cast_type, from_name, to_name, std::move(get_cast_func)) : get_cast_func();
|
||||
|
||||
if (cast_type == CastType::accurateOrNull)
|
||||
return func_cast->execute(arguments, makeNullable(type), arg.column->size());
|
||||
return func_cast->execute(arguments, type, arg.column->size());
|
||||
return func_cast->execute(arguments, makeNullable(type), arg.column->size(), /* dry_run = */ false);
|
||||
return func_cast->execute(arguments, type, arg.column->size(), /* dry_run = */ false);
|
||||
}
|
||||
|
||||
ColumnPtr castColumn(const ColumnWithTypeAndName & arg, const DataTypePtr & type, InternalCastFunctionCache * cache)
|
||||
|
@ -2350,7 +2350,7 @@ struct WindowFunctionLagLeadInFrame final : public StatelessWindowFunction
|
||||
}
|
||||
};
|
||||
|
||||
return func_cast->execute(arguments, argument_types[0], columns[idx[2]]->size());
|
||||
return func_cast->execute(arguments, argument_types[0], columns[idx[2]]->size(), /* dry_run = */ false);
|
||||
}
|
||||
|
||||
static DataTypePtr createResultType(const DataTypes & argument_types_, const std::string & name_)
|
||||
|
@ -906,7 +906,7 @@ static Field applyFunctionForField(
|
||||
{ arg_type->createColumnConst(1, arg_value), arg_type, "x" },
|
||||
};
|
||||
|
||||
auto col = func->execute(columns, func->getResultType(), 1);
|
||||
auto col = func->execute(columns, func->getResultType(), 1, /* dry_run = */ false);
|
||||
return (*col)[0];
|
||||
}
|
||||
|
||||
@ -940,7 +940,7 @@ static FieldRef applyFunction(const FunctionBasePtr & func, const DataTypePtr &
|
||||
/// When cache is missed, we calculate the whole column where the field comes from. This will avoid repeated calculation.
|
||||
ColumnsWithTypeAndName args{(*columns)[field.column_idx]};
|
||||
field.columns->emplace_back(ColumnWithTypeAndName {nullptr, func->getResultType(), result_name});
|
||||
(*columns)[result_idx].column = func->execute(args, (*columns)[result_idx].type, columns->front().column->size());
|
||||
(*columns)[result_idx].column = func->execute(args, (*columns)[result_idx].type, columns->front().column->size(), /* dry_run = */ false);
|
||||
}
|
||||
|
||||
return {field.columns, field.row_idx, result_idx};
|
||||
@ -1011,7 +1011,7 @@ bool applyFunctionChainToColumn(
|
||||
return false;
|
||||
|
||||
result_column = castColumnAccurate({result_column, result_type, ""}, argument_type);
|
||||
result_column = func->execute({{result_column, argument_type, ""}}, func->getResultType(), result_column->size());
|
||||
result_column = func->execute({{result_column, argument_type, ""}}, func->getResultType(), result_column->size(), /* dry_run = */ false);
|
||||
result_type = func->getResultType();
|
||||
|
||||
// Transforming nullable columns to the nested ones, in case no nulls found
|
||||
|
Loading…
Reference in New Issue
Block a user