Kotlin / Kotlin/dataframe

Extra blank line in ColumnSchema.toString after 2 level nested column group

Open
#1,805 1 comment 0 reactions 1 assignee View on GitHub

@zaleslaw is already working on this.

Since Aug 14, 2026.

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

Description

@Test
fun `schema should not have trailing blank line after nested column group`() {
    val df = dataFrameOf(
        "a" to columnOf(1),
        "group" to columnOf(
            "b" to columnOf(2),
            "nested" to columnOf(
                "c" to columnOf(3),
                "d" to columnOf(4),
            ),
        ),
        "e" to columnOf("str"),
    )

    assertEquals(
        """
        a: Int
        group:
            b: Int
            nested:
                c: Int
                d: Int
        e: String
    """.trimIndent(),
        df.schema().toString(),
    )
}

Result:

a: Int
group:
    b: Int
    nested:
        c: Int
        d: Int

e: String

Expected result:

a: Int
group:
    b: Int
    nested:
        c: Int
        d: Int
e: String

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.