Skip to content

Define and add countDistinct aggregation for Pivot and PivotGroupBy #1876

Description

@Allex-Nik

Follow up of #533.

The countDistinct is currently not defined on Pivot and PivotGroupBy. We need to add these overloads for the API consistency (for example, the count function has them) and more straightforward counting distinct values on these receivers.

Functionality to add:

  • On Pivot:
    df.pivot { column_0 }.countDistinct()
    df.pivot { column_0 }.countDistinct { column_1 }

  • On PivotGroupBy:
    df.pivot { column_0 }.groupBy { column_1 }.countDistinct()
    df.pivot { column_0 }.groupBy { column_1 }.countDistinct { column_2 }

Tests and KDocs should be added, relevant existing documentation (for countDistinct and pivot) should be updated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    APIIf it touches our APIenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions