Skip to content

Add an annotation to ignore properties/getters in @DataSchema #1534

@Jolanrensen

Description

@Jolanrensen

Writing something like

@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 #1532 (comment)).

Since we have a way to rename the underlying columns of properties, does it make sense to add support for something like @Transient to ignore properties as part of the schema?
It would then also be ignored when calling List<KeyValue>.toDataFrame().

We would need support from the compiler plugin and the older gradle plugin probably

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions