Add KDocs for non-deprecated `sum` APIs
Open
@Jolanrensen is already working on this.
Since Jul 24, 2026.
KDocs
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Add KDocs for non-deprecated sum APIs
The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/sum.kt holds the public sum APIs, and the coverage sheet marks the group sum/* as missing KDocs. None of these functions are currently documented (there is only a TODO KDocs comment block at the top of the file). Please add concise KDocs for the current non-deprecated APIs only, excluding deprecated and binary-compatibility (@AccessApiOverload, and the whole // region binary compatibility of DeprecationLevel.HIDDEN overloads) overloads.
Scope
APIs needing KDocs, by receiver:
DataColumn.*—sum,sumOfDataRow.*—rowSum,rowSumOfDataFrame.*—sum,sumFor,sumOfGrouped.*—sum,sumFor,sumOfPivot.*—sum,sumFor,sumOfPivotGroupBy.*—sum,sumFor,sumOf
KDocs should explain
- What each operation returns:
sum— the sum of the values (over the whole column / row / frame);sumFor— aDataRow/DataFramewith a separate sum per selected column;sumOf— the sum of a value computed per row/element via the givenexpression;- the grouped / pivoted variants — sum computed per group / per pivot cell.
- The common numeric behavior (already captured in the
TODO KDocsblock, lines 35–42):- supported for all primitive number types; for mixed primitive number types the values are unified before summing;
nulls are filtered out;- the return type is always the same as the input type and never
null, exceptByteandShort, which are returned asInt; - empty input yields
0in the corresponding number type.
- The
skipNaNparameter: howNaNvalues in floating-point columns are treated. - The
separateparameter for thePivot/PivotGroupByvariants, and the optionalname/resultNameparameter for theGroupedvariants. - Note the
rowSumOfoverloads are split per concrete primitive type (Short/Byte/Int/Long/Float/Double) plus aKTypeoverload, because a singlereified T : Number?is not possible — a shared KDoc (e.g. via@include) is fine.
Acceptance criteria
- Concise KDocs are added to all non-deprecated
sum/sumFor/sumOf/rowSum/rowSumOfoverloads insum.kt. - No documentation is added for deprecated /
@AccessApiOverloadoverloads, nor for anything in the// region binary compatibilityblock. - KDocs cover the
skipNaNparameter, the "same-as-input type, never null" return contract (with theByte/Short→Intexception), empty-input →0, and null-filtering. - KDocs clearly distinguish the value-returning (
sum,sumOf,rowSum*) variants from the per-column aggregation (sumFor) variants. - Docs are consistent with the site docs at
sum.html. - The
TODO KDocscomment block at the top of the file is removed once its content has been folded into the actual KDocs.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.