Skip to content

Missing overloads for Iterable<ArrayLike>.toDataFrame() #676

Closed
@Jolanrensen

Description

@Jolanrensen

Currently, running

listOf(intArrayOf(1, 2, 3), intArrayOf(4, 5, 6)).toDataFrame()

results in:

No accessor found for property val kotlin.IntArray.size: kotlin.Int
kotlin.reflect.jvm.internal.KotlinReflectionInternalError: No accessor found for property val kotlin.IntArray.size: kotlin.Int

This is because toDataFrame() defaults to toDataFrame { properties() }, so it tries to dissect the properties of the IntArray class in this instance.

Instead, I believe this should create a DataFrame<ValueProperty<IntArray>>, like for the other primitives.

There is a challenge to adding these though. I found adding the overload Iterable<BooleanArray>.toDataFrame() breaks calls to Iterable<AnyBaseCol>.toDataFrame() for some reason. And adding them like <B : BooleanArray?> Iterable<B>.toDataFrame() is impossible, because arrays are illegal supertypes...

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions