Adds Iterable<DataRowSchema>.toDataFrame() overload#1907
Draft
Jolanrensen wants to merge 2 commits into
Draft
Conversation
…piler plugin test in :samples, Issue #1880
Collaborator
Author
Collaborator
Author
|
A workaround for #1908 could be to write the function like this: @JvmName("dataRowSchemaIterableToDataFrame")
@Suppress("INCORRECT_LEFT_COMPONENT_OF_INTERSECTION")
public inline fun <reified T : DataRowSchema> Iterable<T>.toDataFrame(): DataFrame<T & Any> =
@DisableInterpretation
toDataFrame {
properties()
}But notebooks don't like |
AndreiKingsley
approved these changes
Jul 1, 2026
Collaborator
|
Let's probably not merge since this needs a workaround if flexible type appears. A few things need to be fixed on compiler plugin side to properly work with such types. Let's wait these fixes in stable release of Kotlin, postpone feature to 1.1 Even this is not ideal because it suppresses INCORRECT_LEFT_COMPONENT_OF_INTERSECTION, which is not guaranteed to work in the future public inline fun <reified T : DataRowSchema> Iterable<T>.toDataFrame(): DataFrame<T & Any> =
@DisableInterpretation
toDataFrame {
properties()
} |
Jolanrensen
marked this pull request as draft
July 2, 2026 09:58
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Fixes #1880
Added Iterable.toDataFrame() overload for DataRowSchema types,
compiler plugin test in :samples, because the compiler plugin is live there.
This fixes the compiler plugin creating a new type immediately when turning a list of
@DataSchemaannotated classes into a dataframe.