Avoid breaking existing code with Iterable<DataSchema>.toDataFrame() calls when enabling the plugin
Open
bug
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Problem from example being converted to use plugin found by @Jolanrensen
```kt
@DataSchema
data class MySchema(val i: Int)
fun main() {
val df: DataFrame = listOf(MySchema(1)).toDataFrame() // breaks when plugin is enabled, type is now MySchema_98
df.toList() // breaks when plugin is enabled
}
```
Proposed change:
Add toDataFrame overload. If T is already DataSchema type, no need to introduce plugin-generated local type.
```kt
public inline fun Iterable.toDataFrame(): DataFrame =
@DisableInterpretation toDataFrame {
properties()
}
```
Contributor guide
Assessment
This issue has not been assessed yet.