Skip to content

Implement distinct and order by clause for string_agg aggregate function #8260

Description

@haohuaijin

Is your feature request related to a problem or challenge?

After #8148 merge, we have implemented the basic string_agg function, but order by and distinct are not supported yet.

As @alamb said, if there is no order by clause, the string_agg output result is non deterministic , so it is very important to support order by in string_agg.

One thing I thought of was is I think this function will be non deterministic when aggregating without an ORDER BY -- specifically since the aggregate can see the inputs in any order when doing a multi-phase repartitioned group by.

Describe the solution you'd like

add support of distinct and order by for string_agg function.

Describe alternatives you've considered

No response

Additional context

No response

Activity

  1. changed the title [-]Implement `distinct` and `order by` cluase for `string_agg` aggregate function[/-] [+]Implement `distinct` and `order by` clause for `string_agg` aggregate function[/+] on Nov 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions