Add an annotation to ignore properties/getters in `@DataSchema`
- Dominant language
- Kotlin
- Stars
- 1.1k
- Forks
- 83
- Avg merge
- 4d 12h
- Merged PRs (30d)
- 30
Description
Writing something like
```kt
@DataSchema
data class KeyValue(val key: String, val value: String) {
@Deprecated("use key, not name")
val name get() = key
}
```
will cause column accessors to be generated for `"name"` as well as for `"key"` and `"value"`, even though `name` is just a getter, planned to be removed. We don't want it as part of the DataFrame or the DataSchema; it holds no data (as found in the wild here https://github.com/Kotlin/dataframe/pull/1532#issuecomment-3469691437).
Since we have a way to rename the underlying columns of properties, does it make sense to add support for something like [`@Transient`](https://kotlinlang.org/api/kotlinx.serialization/kotlinx-serialization-core/kotlinx.serialization/-transient/) to ignore properties as part of the schema?
It would then also be ignored when calling `List.toDataFrame()`.
We would need support from the compiler plugin and the older gradle plugin probably
Contributor guide
Research direction
Start by tracing how @DataSchema properties become schema columns and how List.toDataFrame() uses that schema. Review the compiler plugin and older Gradle plugin support mentioned in the issue, then define the annotation behavior for ignored properties. Done means the getter is excluded from the DataSchema and from toDataFrame() results.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system, data
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100