Skip to content

Add support for distinct aggregation #100

Closed

Description

@dai-chen

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
Add support for the following aggregations. Note that COUNT(DISTINCT) is highest priority and others are optional. MySQL reference: https://dev.mysql.com/doc/refman/8.0/en/aggregate-functions.html#function_count

  1. COUNT(DISTINCT expr)
  2. AVG(DISTINCT expr)
  3. SUM(DISTINCT expr)
  4. MIN(DISTINCT expr)
  5. MAX(DISTINCT expr)

PPL may also needs to support count distinct. Reference: https://docs.splunk.com/Documentation/SCS/current/SearchReference/Aggregatefunctions#distinct_count.28.26lt.3Bvalue.26gt.3B.29_or_dc.28.26lt.3Bvalue.26gt.3B.29

Describe alternatives you've considered
N/A

Activity

  1. added
    enhancement
    PPL
    on May 27, 2021
  2. dai-chen commented on May 27, 2021

    @dai-chen
    CollaboratorAuthor

    There may be limitation when there are more than one COUNT(DISTINCT) and they cannot be pushed down to OpenSearch aggregation API together. As I recall, it is translated to JOIN in other database such as MS SQL Server.

  3. added a commit that references this issue on Mar 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

PPLSQLenhancement

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions