Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Jolanrensen opened this issue Apr 25, 2024 · 2 comments
Open

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

Jolanrensen opened this issue Apr 25, 2024 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Jolanrensen
Copy link
Collaborator

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...

@Jolanrensen Jolanrensen added the bug Something isn't working label Apr 25, 2024
@Jolanrensen Jolanrensen added this to the 0.14.0 milestone Apr 25, 2024
@Jolanrensen Jolanrensen self-assigned this Apr 25, 2024
@Jolanrensen
Copy link
Collaborator Author

Actually, we might be missing overloads for other value-like types as well, like LocalDateTime, LocalDate, Duration, Instant, Enum, Temporal, maybe more

@Jolanrensen
Copy link
Collaborator Author

And align the behavior with unfold: #677

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant