Skip to content

Conversation

@AndreiKingsley
Copy link
Collaborator

@AndreiKingsley AndreiKingsley commented Nov 7, 2025

Closes #1525
Closes #1552

@AndreiKingsley AndreiKingsley marked this pull request as ready for review November 7, 2025 15:21
Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll review more tomorrow :)

public typealias PivotColumnsSelector<T, C> = Selector<PivotDsl<T>, ColumnsResolver<C>>

/**
* An intermediate class used in [`Pivot` reducing][PivotDocs.Reducing] operations.
Copy link
Collaborator

@Jolanrensen Jolanrensen Nov 11, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI in KDoc rendering, the alias side of []-code references are automatically made code-style. So the backticks do nothing. However, you can leave them because this might change in the future. It's not part of the GFM spec

interface Pivoting

/**
* Grouping key can also be created inline
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*A grouping key or *grouping keys

/**
* Grouping key can also be created inline
* (i.g. by creating a new column using [expr] or simply renaming the old one
* using [named]) :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a space in front of :

/**
* Pivoted columns can also be created inline
* (i.g. by creating a new column using [expr] or simply renaming the old one
* using [named]) :
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space

// region pivotMatches

/**
* Computes a **presence matrix** (similar to one-hot encoding) for the values in the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you link to wikipedia for one-hot-encoding? in case people don't know about it and they are curious :) like here https://en.wikipedia.org/wiki/One-hot#Machine_learning_and_statistics

* (they become [column groups][ColumnGroup]
* corresponding to value combinations when using [then][PivotDsl.then],
* similar to [pivot]);
* * **Rows** correspond to all unique combinations of values from the {@get [GroupingColumns] grouping} columns;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eyy, nice KoDEx usage ;P Just for funzies, did you know you can also write this like $[GroupingColumns]=grouping? :) (not that it's much more compact or anything, just an alternative if you ever need it)

@Jolanrensen Jolanrensen self-requested a review November 13, 2025 11:06
Copy link
Collaborator

@Jolanrensen Jolanrensen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just some tiny comments left, feel free to merge it afterwards, it looks good!

@AndreiKingsley AndreiKingsley merged commit 6289f5b into master Nov 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AggregateGroupedDsl.pivotCounts computes pivotMatches instead Add pivot KDocs

3 participants