Kotlin / Kotlin/dataframe

Empty DataFrame with `Nothing` column creates String column when written to Arrow

Open
#1,812 0 comments 0 reactions 1 assignee Claimed by @zaleslaw View on GitHub
bug files
Dominant language
Kotlin
Stars
1.1k
Forks
83
Avg merge
4d 12h
Merged PRs (30d)
30

Description

As follow up for https://github.com/Kotlin/dataframe/pull/1807

Empty DataFrame with `Nothing` column creates String column when written to Arrow/Feather (probably others too):

```kt
val original = dataFrameOf("emptyCol" to DataColumn.empty())

val featherBytes = original.saveArrowFeatherToByteArray()
val fromFeather = DataFrame.readArrowFeather(featherBytes)
fromFeather shouldBe original // fails, type is String instead of Nothing
```

This is likely because `Nothing` matches `isSubtypeOf(typeOf())` in `KType.toArrowField()`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.