mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
Fix run issues
This commit is contained in:
parent
b8f1110455
commit
d6480b846c
@ -49,8 +49,6 @@ class GroupConcatImpl : public IAggregateFunctionDataHelper<GroupConcatData<has_
|
||||
{
|
||||
static constexpr auto name = "groupConcat";
|
||||
|
||||
constexpr static std::array<const char *, 2> names_and_aliases = { "groupConcat", "group_concat" };
|
||||
|
||||
SerializationPtr serialization;
|
||||
UInt64 limit;
|
||||
const String delimiter;
|
||||
@ -61,9 +59,10 @@ public:
|
||||
|
||||
String getName() const override;
|
||||
|
||||
static std::array<const char *, 2> getNameAndAliases()
|
||||
static const std::vector<std::string>& getNameAndAliases()
|
||||
{
|
||||
return names_and_aliases;
|
||||
static const std::vector<std::string> aliases = {"groupConcat", "group_concat"};
|
||||
return aliases;
|
||||
}
|
||||
|
||||
void add(AggregateDataPtr place, const IColumn ** columns, size_t row_num, Arena * arena) const override;
|
||||
|
@ -648,11 +648,10 @@ QueryTreeNodePtr QueryTreeBuilder::buildExpression(const ASTPtr & expression, co
|
||||
}
|
||||
else
|
||||
{
|
||||
const char * name = function->name.c_str();
|
||||
// Check if the function is groupConcat with exactly two arguments
|
||||
if (std::any_of(GroupConcatImpl<false>::getNameAndAliases().begin(),
|
||||
GroupConcatImpl<false>::getNameAndAliases().end(),
|
||||
[name](const char *alias) { return std::strcmp(name, alias) == 0; })
|
||||
const auto & group_concat_aliases = GroupConcatImpl<false>::getNameAndAliases();
|
||||
if (!function->name.empty() && std::any_of(
|
||||
group_concat_aliases.begin(), group_concat_aliases.end(),
|
||||
[&](const std::string &s) { return s == function->name; })
|
||||
&& function->arguments && function->arguments->children.size() == 2)
|
||||
{
|
||||
result = setFirstArgumentAsParameter(function, context);
|
||||
|
Loading…
Reference in New Issue
Block a user