New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arrayFold: Switch accumulator and array arguments #55948
Conversation
This is an automated comment for commit 68c3f41 with description of existing statuses. It's updated for the latest CI running ❌ Click here to open a full report in a separate page Successful checks
|
1ba574c
to
18515f5
Compare
18515f5
to
b9b66e7
Compare
@@ -198,9 +198,9 @@ class ArrayFold : public IFunction | |||
auto res_lambda = lambda_function->cloneResized(prev[1]->size()); | |||
auto * res_lambda_ptr = typeid_cast<ColumnFunction *>(res_lambda.get()); | |||
|
|||
res_lambda_ptr->appendArguments(std::vector({ColumnWithTypeAndName(std::move(prev[1]), arguments.back().type, arguments.back().name)})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant change.
DataTypes nested_types(arguments.size() - 1); | ||
for (size_t i = 0; i < nested_types.size() - 1; ++i) | ||
DataTypes accumulator_and_array_types(arguments.size() - 1); | ||
accumulator_and_array_types[0] = arguments.back(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Relevant change.
The lambda argument of function arrayFold now requires the accumulator as the first argument. This makes the semantics more similar to other languages, e.g.
"Not for changelog" because
arrayFold
is new and not in any released version yet.Changelog category (leave one):