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";
|
static constexpr auto name = "groupConcat";
|
||||||
|
|
||||||
constexpr static std::array<const char *, 2> names_and_aliases = { "groupConcat", "group_concat" };
|
|
||||||
|
|
||||||
SerializationPtr serialization;
|
SerializationPtr serialization;
|
||||||
UInt64 limit;
|
UInt64 limit;
|
||||||
const String delimiter;
|
const String delimiter;
|
||||||
@ -61,9 +59,10 @@ public:
|
|||||||
|
|
||||||
String getName() const override;
|
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;
|
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
|
else
|
||||||
{
|
{
|
||||||
const char * name = function->name.c_str();
|
const auto & group_concat_aliases = GroupConcatImpl<false>::getNameAndAliases();
|
||||||
// Check if the function is groupConcat with exactly two arguments
|
if (!function->name.empty() && std::any_of(
|
||||||
if (std::any_of(GroupConcatImpl<false>::getNameAndAliases().begin(),
|
group_concat_aliases.begin(), group_concat_aliases.end(),
|
||||||
GroupConcatImpl<false>::getNameAndAliases().end(),
|
[&](const std::string &s) { return s == function->name; })
|
||||||
[name](const char *alias) { return std::strcmp(name, alias) == 0; })
|
|
||||||
&& function->arguments && function->arguments->children.size() == 2)
|
&& function->arguments && function->arguments->children.size() == 2)
|
||||||
{
|
{
|
||||||
result = setFirstArgumentAsParameter(function, context);
|
result = setFirstArgumentAsParameter(function, context);
|
||||||
|
Loading…
Reference in New Issue
Block a user