Kotlin / Kotlin/dataframe

Add KDocs for function `Split`

Open
#1,471 0 comments 0 reactions 1 assignee View on GitHub

@AndreiKingsley is already working on this.

Since Oct 2, 2025.

KDocs
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

Add KDocs for non-deprecated split APIs

The file core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/split.kt holds the public split operation and its Split.* / SplitWithTransform.* builder chain. Almost all of it is undocumented — only Split.by(regex) and Split.match(...) currently have KDocs.

Please add concise KDocs for the current non-deprecated APIs only. Deprecated and binary-compatibility (@AccessApiOverload, string-ReplaceWith) overloads are out of scope.

Scope

Non-deprecated APIs in split.kt, by stage of the chain:

  • Entry pointsDataFrame.split(...) (selector and vararg String) and DataColumn<Iterable<*>>.splitInto(...).
  • Builder types — the Split<T, C> class (incl. cast()), the SplitWithTransform<T, C, R> class, and the ColumnNamesGenerator typealias.
  • Split.* configurationby(...) (char / string delimiters, iterable transform; the regex overload is already documented), default(...), match(...) (already documented).
  • SplitWithTransform.* / Split.* terminals (produce a DataFrame) — into(...), inward(...), intoColumns(), intoRows(...), inplace(), and SplitWithTransform.default(...).

Out of scope: all deprecated / @AccessApiOverload overloads, the already-documented Split.by(regex) and Split.match(...), and internal/@PublishedApi helpers.

KDocs should explain
  • The overall flow: split { columns } selects columns to split → an optional by/match/default step defines how each value is split into parts → a terminal (into / inward / intoColumns / intoRows / inplace) decides where the parts go.
  • What each terminal produces:
    • into(...) — new sibling columns named by names (with extraNamesGenerator for the overflow);
    • inward(...) — the same, but nested inside a column group under the source column;
    • intoColumns() — splits a column of DataFrame/rows into columns of a group;
    • intoRows(...) — explodes each split into separate rows (dropEmpty behavior);
    • inplace() — keeps the parts as a List in the original column.
  • How replacement column names are chosen: given names, then extraNamesGenerator, then the auto-generated splitN fallback (see the existing by(regex) example).
  • by/match semantics: by splits by delimiters / a custom transform; match extracts regex capturing groups; default supplies a value for missing parts.
  • That entry points return a lazy Split builder (no work until a terminal is called), and cast() only refines the generic type.
Acceptance criteria
  • Every public, non-deprecated declaration in split.kt has a concise KDoc (the file is fully covered), including the Split and SplitWithTransform classes and the ColumnNamesGenerator typealias.
  • No documentation is added for deprecated or @AccessApiOverload overloads.
  • KDocs distinguish the terminals (into vs inward vs intoColumns vs intoRows vs inplace) and their resulting shape.
  • KDocs explain the names / extraNamesGenerator naming logic.
  • Style and cross-references are consistent with the existing Split.by(regex) / Split.match KDocs and with the site docs at split.html.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.