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.