You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Upgraded a Gradle/JVM project and found out that my @DataSchema-annotated classes are no longer generating column accessors. Backtracked and found it works fine in 0.12.1 then stops working in 0.13.1.
A very basic example:
packageorg.exampleimportorg.jetbrains.kotlinx.dataframe.DataFrameimportorg.jetbrains.kotlinx.dataframe.annotations.DataSchemaimportorg.jetbrains.kotlinx.dataframe.api.groupByimportorg.jetbrains.kotlinx.dataframe.api.sumForimportorg.jetbrains.kotlinx.dataframe.api.toDataFrame
@DataSchema
data classStoreHour(
valweekday:Int,
valhour:Int,
valsales:Double,
valtaxCollected:Double
)
funmain() {
val name ="Kotlin"println("Hello, $name!")
for (i in1..5) {
println("i = $i")
}
val storeHours :List<StoreHour> =listOf(
StoreHour(2, 7, 500.0, 40.0),
StoreHour(2, 8, 650.0, 60.0),
StoreHour(2, 9, 770.0, 70.0),
StoreHour(2, 10, 900.0, 80.0)
)
val df :DataFrame<StoreHour> = storeHours.toDataFrame() //.cast<StoreHour>()println(df)
val dfSums :DataFrame<StoreHour> = df.groupBy { weekday }.sumFor { sales and taxCollected }
println(dfSums)
}
and my build.gradle.kts:
plugins {
kotlin("jvm") version "2.0.20"
id("com.google.devtools.ksp") version "2.1.10-1.0.29"// "2.0.20-1.0.25"
id("org.jetbrains.kotlinx.dataframe") version "0.13.1"// 0.12.1
}
group ="org.example"
version ="1.0-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
testImplementation(kotlin("test"))
implementation("org.jetbrains.kotlinx:dataframe:0.13.1") // 0.12.1
}
tasks.test {
useJUnitPlatform()
}
kotlin {
jvmToolchain(21)
}
and when I roll back to 0.12.1 in gradle (both plugin and dependency) and the ksp plugin back to 2.0.20-1.0.25, everything works as expected:
I experimented with the ksp plugin version but that doesn't seem to have any effect on the schema generation (other than it won't build/assemble when using the wrong version)
I also see that release notes for 0.13.1 mention a change to ColumnsSelection DSL #372 but the syntax I'm using still appears to be supported in the 0.15 documentation
Thanks for any help getting this working again.
The text was updated successfully, but these errors were encountered:
Thanks! Using the ksp dependency rather than the dataframe plugin appears to solve the issue. I upgraded to latest (0.15) and seems to be working great, all my columns are recognized and the program compiles.
Upgraded a Gradle/JVM project and found out that my
@DataSchema
-annotated classes are no longer generating column accessors. Backtracked and found it works fine in 0.12.1 then stops working in 0.13.1.A very basic example:
and my build.gradle.kts:
and when I roll back to 0.12.1 in gradle (both plugin and dependency) and the ksp plugin back to 2.0.20-1.0.25, everything works as expected:
I experimented with the ksp plugin version but that doesn't seem to have any effect on the schema generation (other than it won't build/assemble when using the wrong version)
I also see that release notes for 0.13.1 mention a change to ColumnsSelection DSL #372 but the syntax I'm using still appears to be supported in the 0.15 documentation
Thanks for any help getting this working again.
The text was updated successfully, but these errors were encountered: