Skip to content

Datasets of lists of data classes / tuples don't work #86

@Jolanrensen

Description

@Jolanrensen

While support for data classes in arrays works fine:

dsOf(
    arrayOf(1 to 2, 3 to 4)
).show()

This doesn't work

dsOf(
    listOf(1 to 2, 3 to 4)
).show()

The exception is:

Exception in thread "main" java.lang.UnsupportedOperationException: No Encoder found for kotlin.Pair[A,B]
- array element class: "kotlin.Pair"
- root class: "java.util.List"

I suspect this is because the encoding for lists in the schema() function of the API misses a recursive call on its subtypes somehow. Needs to be investigated though, as it would also fix Datasets of lists of Tuples I think.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions