Skip to content

Commit

Permalink
Update generated sources with recent changes
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Oct 4, 2024
1 parent b34cca0 commit 4aeb173
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jetbrains.kotlinx.dataframe.codeGen

import com.squareup.kotlinpoet.asTypeName
import org.jetbrains.kotlinx.dataframe.DataFrame
import org.jetbrains.kotlinx.dataframe.DataRow
import org.jetbrains.kotlinx.dataframe.annotations.ColumnName
Expand Down Expand Up @@ -109,7 +110,11 @@ internal object MarkersExtractor {

else -> {
fieldType = FieldType.ValueFieldType(
if (nullableProperties) type.toString().toNullable() else type.toString(),
if (nullableProperties) {
type.asTypeName().toString().toNullable()
} else {
type.asTypeName().toString()
},
)
ColumnSchema.Value(
if (nullableProperties) type.withNullability(true) else type,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.jetbrains.kotlinx.dataframe.impl.codeGen

import com.squareup.kotlinpoet.asTypeName
import org.jetbrains.kotlinx.dataframe.codeGen.FieldType
import org.jetbrains.kotlinx.dataframe.codeGen.GeneratedField
import org.jetbrains.kotlinx.dataframe.codeGen.Marker
Expand Down Expand Up @@ -66,7 +67,7 @@ internal class SchemaProcessorImpl(
fun getFieldType(columnSchema: ColumnSchema): FieldType =
when (columnSchema) {
is ColumnSchema.Value ->
FieldType.ValueFieldType(columnSchema.type.toString())
FieldType.ValueFieldType(columnSchema.type.asTypeName().toString())

is ColumnSchema.Group ->
FieldType.GroupFieldType(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
@Test
fun `short functional types are not supported`() {
fields.keys.asClue {
fields["d"]!!.renderAccessorFieldType() shouldBe "() -> kotlin.Unit"
fields["d"]!!.renderFieldType() shouldBe "() -> kotlin.Unit"
fields["d"]!!.renderAccessorFieldType() shouldBe "kotlin.Function0<kotlin.Unit>"
fields["d"]!!.renderFieldType() shouldBe "kotlin.Function0<kotlin.Unit>"
}
}

Expand Down Expand Up @@ -112,7 +112,7 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
@Test
fun `functional type column`() {
fields.keys.asClue {
fields["d"]!!.renderColumnType() shouldBe "DataColumn<() -> kotlin.Unit>"
fields["d"]!!.renderColumnType() shouldBe "DataColumn<kotlin.Function0<kotlin.Unit>>"
}
}

Expand Down

0 comments on commit 4aeb173

Please sign in to comment.