Make AnyFrame.cast actually check schema by default
Open
API
enhancement
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Right now cast is what can be considered "unchecked cast". Any schema mismatches will result in **runtime column not found / classcast exceptions when columns are used.** I'd say this is totally unexpected default behavior that somewhat breaks typesafety impression
What i suggest:
cast() => rename to "uncheckedCast" or "castUnchecked", it can be used if schema slightly mismatches but that's ok? or when there's 100% confidence to avoid some extra overhead
new cast() => by default behaves like "cast(verify = true)"
Another step to improve usability of `cast`
https://github.com/Kotlin/dataframe/issues/1549
Contributor guide
Assessment
This issue has not been assessed yet.