-
Notifications
You must be signed in to change notification settings - Fork 66
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
[Compiler plugin] Lower frontend generated implicit receivers #869
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import org.jetbrains.kotlinx.dataframe.annotations.DataSchema | ||
import org.jetbrains.kotlinx.dataframe.api.* | ||
|
||
|
||
@DataSchema | ||
data class Record(val a: String, val b: Int) | ||
|
||
fun box(): String { | ||
val df = List(10) { Record(it.toString(), it) }.let { dataFrameOf(*it.toTypedArray()) } | ||
val aggregate = df.pivot { b }.aggregate { | ||
this.add("c") { 123 }.c | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. which part failed before and is now solved? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. execution of this expression |
||
} | ||
return "OK" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does HasSchema do again? There's no docs :/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To help identify type parameter that represents dataframe schema
org.jetbrains.kotlinx.dataframe.plugin.InterpretKt#getSchema
org/jetbrains/kotlinx/dataframe/plugin/interpret.kt:255
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, so if we would take the type parameter at
schemaArg
, which inAggregateDsl<out T>
isout T
, and put it inDataFrame<>
likeDataFrame<T>
, a schema generated for thát would represent this object. And this could be different for types likeGroupedDataRow<out T, out G>
whereG
might represent the data schema?Could you explain this in a small piece of KDoc?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll think of something