Skip to content
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

Support group concat function #898

Merged

Conversation

Jasmine-ge
Copy link
Contributor

@Jasmine-ge Jasmine-ge commented Feb 12, 2025

Calculates a concatenated string from a group of strings, optionally separated by a delimiter, and optionally limited by a maximum number of elements.

Syntax
group_concat (expression [, delimiter [, limit ] ])

Arguments

  • expression — The expression or column name that outputs strings to be concatenated.
  • delimiter — A string that will be used to separate concatenated values. This parameter is optional and defaults to an empty string or delimiter from parameters if not specified.

Parameters

  • delimiter — A string that will be used to separate concatenated values. This parameter is optional and defaults to an empty string if not specified.
  • limit — A positive integer specifying the maximum number of elements to concatenate. If more elements are present, excess elements are ignored. This parameter is optional.

Returned value

  • Returns a string consisting of the concatenated values of the column or expression. If the group has no elements or only null elements, and the function does not specify a handling for only null values, the result is a nullable string with a null value.

Please write user-readable short description of the changes:
Port CH PRs and update the obvious refactor (utils, format, etc):
ClickHouse/ClickHouse#65009
ClickHouse/ClickHouse#69455
ClickHouse/ClickHouse#72540

close #889

@Jasmine-ge Jasmine-ge requested a review from yl-lisen February 12, 2025 02:38
@Jasmine-ge Jasmine-ge self-assigned this Feb 12, 2025
@CLAassistant
Copy link

CLAassistant commented Feb 12, 2025

CLA assistant check
All committers have signed the CLA.

Rearranged includes

groupConcat consistency

Change the logic

Change the logic to use analyzer

Update AggregateFunctionGroupConcat.h

Fix run issues

Remove templates from GroupConcatData

support group concat function
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-889-support-group-concat-function branch from d7cc25f to 04fe5ed Compare February 12, 2025 02:45
@Jasmine-ge Jasmine-ge force-pushed the enhancement/issue-889-support-group-concat-function branch from c4fabe8 to 8070a58 Compare February 12, 2025 05:39
@Jasmine-ge Jasmine-ge merged commit 87b63a0 into develop Feb 13, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support group_concat function
3 participants