Conversation
40af1e2 to
1aad806
Compare
| internal typealias AggregateDslColumnKindSnippet = Nothing | ||
|
|
||
| @ExcludeFromSources | ||
| internal typealias AGGREGATE_DSL_TYPE = Nothing |
There was a problem hiding this comment.
these are arguments? I usually put them inside a documentation interface, so they are scoped and don't pollute the global namespace
| * A specialized [ColumnsSelectionDsl] that allows to aggregate | ||
| * [DataFrame] or `DataFrame`-like structures ([GroupBy], [Pivot] or [PivotGroupBy]). | ||
| * | ||
| * {@include [AggregateDslDocsSnippet]} |
| * | ||
| * * [count][DataFrame.count] — calculate the number of rows | ||
| * (optionally counting only rows that satisfy the given predicate); | ||
| * * [max][DataFrame.max] / [maxOf][DataFrame.maxOf] / [maxFor][DataFrame.maxFor] — |
There was a problem hiding this comment.
what about the -By functions? like maxBy. Should they be mentioned here as well or not?
There was a problem hiding this comment.
Hmm those are reducing methods;
but yeah, reducing is a special case of aggregation so why not.
| * {@include [AggregateDslDocsSnippet]} | ||
| * {@set [AGGREGATE_DSL_TYPE] [AggregateDsl]} | ||
| * {@set [AGGREGATE_DSL_RECEIVER] [DataFrame], [GroupBy], [Pivot] or [PivotGroupBy]} | ||
| * {@set [AGGREGATE_DSL_APPLY] The given [expression][body] is applied to each group independently.} |
There was a problem hiding this comment.
[body] points at nothing
| /** | ||
| * A specialized [ColumnsSelectionDsl] that allows to aggregate | ||
| * [DataFrame] or `DataFrame`-like structures ([GroupBy], [Pivot] or [PivotGroupBy]). | ||
| * |
There was a problem hiding this comment.
I'm missing a example here maybe... or is that better done in the specific functions? it's not obvious how to define .aggregate { sum { col } default 0 into "col" }
There was a problem hiding this comment.
Oh, I forgot about it actually! Examples are supposed to be in different .aggregate {}-s kdocs!
| * {@include [AggregateDslDocsSnippet]} | ||
| * {@set [AGGREGATE_DSL_TYPE] [AggregateGroupedDsl]} | ||
| * {@set [AGGREGATE_DSL_RECEIVER] [GroupBy]} | ||
| * {@set [AGGREGATE_DSL_APPLY] The given [expression][body] is applied to each group independently.} |
There was a problem hiding this comment.
body again points at nothing, making it expand incorrectly when included in AggregateGroupedDsl
| * Returns a new [DataRow] with the original [pivot] keys as top-level columns on top level | ||
| * and the correspndonding aggregated values in new nested columns. | ||
| * | ||
| * {@include [AggregateDslDocsSnippet]} |
There was a problem hiding this comment.
braces not needed for include, but they are needed for the set's, because there's more text below
| /** | ||
| * Converts this [GroupBy] into a [DataFrame]. | ||
| * | ||
| * Do the same as [GroupBy.toDataFrame]. |
| } | ||
|
|
||
| /** | ||
| * {@include [PivotGroupByDocs.CommonDescription]} |
| * Check out [`PivotGroupBy` Grammar][PivotGroupByDocs.Grammar] for more information. | ||
| * | ||
| * For more information: {@include [DocumentationUrls.Pivot]} | ||
| * |
There was a problem hiding this comment.
hmm yeah, I still miss an example or two, how the aggregate DSL looks in practice
Helps #1528.
Adds
aggregatemethods KDocs