diff --git a/bridge-generator/bridges.json b/bridge-generator/bridges.json deleted file mode 100644 index 14ff77f96c..0000000000 --- a/bridge-generator/bridges.json +++ /dev/null @@ -1,208 +0,0 @@ -[{ - "type": { - "name": "DataColumn", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "DataFrame", - "vararg": false - }, - "approximation": "PluginDataFrameSchema", - "converter": "dataFrame", - "lens": "Schema", - "supported": true -}, { - "type": { - "name": "String", - "vararg": false - }, - "approximation": "String", - "converter": "string", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "Infer", - "vararg": false - }, - "approximation": "Infer", - "converter": "enum", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "RowExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "ColumnAccessor", - "vararg": false - }, - "approximation": "ColumnAccessorApproximation", - "converter": "columnAccessor", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "KProperty", - "vararg": false - }, - "approximation": "KPropertyApproximation", - "converter": "kproperty", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnSelector", - "vararg": false - }, - "approximation": "ColumnWithPathApproximation", - "converter": "columnWithPath", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "InsertClause", - "vararg": false - }, - "approximation": "InsertClauseApproximation", - "converter": "insertClause", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnPath", - "vararg": false - }, - "approximation": "ColumnPathApproximation", - "converter": "columnPath", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "ColumnAccessor<*>", - "vararg": false - }, - "approximation": "ColumnAccessorApproximation", - "converter": "columnAccessor", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "KProperty<*>", - "vararg": false - }, - "approximation": "KPropertyApproximation", - "converter": "kproperty", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "AddExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "KProperty", - "vararg": true - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "String", - "vararg": true - }, - "approximation": "List", - "converter": "varargString", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "Convert", - "vararg": false - }, - "approximation": "ConvertApproximation", - "converter": "arg", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "AnyCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "RowValueExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "DataFrame.(DataColumn) -> AnyBaseCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnSet", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "Boolean", - "vararg": false - }, - "approximation": "Boolean", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}] \ No newline at end of file diff --git a/bridge-generator/build.gradle.kts b/bridge-generator/build.gradle.kts deleted file mode 100644 index 6e4c048bf8..0000000000 --- a/bridge-generator/build.gradle.kts +++ /dev/null @@ -1,45 +0,0 @@ -plugins { - kotlin("jvm") version "1.7.0" - kotlin("plugin.dataframe") - kotlin("libs.publisher") version "0.0.60-dev-30" -} - -group = "org.jetbrains.kotlinx.dataframe" -version = "0.9.0-dev" - -repositories { - mavenCentral() - maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap") -} - -dependencies { - implementation("org.jetbrains.kotlinx:dataframe") - //implementation("org.jetbrains.kotlinx:kotlinx-serialization-json:1.3.2") -// implementation(kotlin("stdlib")) - testImplementation("org.junit.jupiter:junit-jupiter-api:5.8.1") - testImplementation("io.kotest:kotest-assertions-core:4.6.3") - testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.8.1") -} - -kotlin.sourceSets.getByName("main").kotlin.srcDir("build/generated/ksp/main/kotlin/") -kotlin.sourceSets.getByName("test").kotlin.srcDir("build/generated/ksp/test/kotlin/") - -tasks.getByName("test") { - useJUnitPlatform() -} - -tasks.withType { - sourceCompatibility = JavaVersion.VERSION_1_8.toString() - targetCompatibility = JavaVersion.VERSION_1_8.toString() -} - - -kotlinPublications { - fairDokkaJars.set(false) - publication { - publicationName.set("api") - artifactId.set("bridge-generator") - description.set("Data processing in Kotlin") - packageName.set(artifactId) - } -} diff --git a/bridge-generator/columnSelectionDsl_bridges.json b/bridge-generator/columnSelectionDsl_bridges.json deleted file mode 100644 index be8743f553..0000000000 --- a/bridge-generator/columnSelectionDsl_bridges.json +++ /dev/null @@ -1,37 +0,0 @@ -[{ - "type": { - "name": "ColumnSet", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "DataFrame", - "vararg": false - }, - "approximation": "PluginDataFrameSchema", - "converter": "dataFrame", - "lens": "Schema", - "supported": true -}, { - "type": { - "name": "AnyCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "InsertClause", - "vararg": false - }, - "approximation": "InsertClauseApproximation", - "converter": "insertClause", - "lens": "Value", - "supported": true -}] diff --git a/bridge-generator/convert_bridges.json b/bridge-generator/convert_bridges.json deleted file mode 100644 index 3a48cd13c5..0000000000 --- a/bridge-generator/convert_bridges.json +++ /dev/null @@ -1,50 +0,0 @@ -[ - { - "type": { - "name": "DataFrame", - "vararg": false - }, - "approximation": "PluginDataFrameSchema", - "converter": "dataFrame", - "lens": "Schema", - "supported": true - }, - { - "type": { - "name": "AnyCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false - }, - { - "type": { - "name": "InsertClause", - "vararg": false - }, - "approximation": "InsertClauseApproximation", - "converter": "insertClause", - "lens": "Value", - "supported": true - }, { - "type": { - "name": "RowValueExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true - }, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true - } -] diff --git a/bridge-generator/explode_bridges.json b/bridge-generator/explode_bridges.json deleted file mode 100644 index 64dd9faade..0000000000 --- a/bridge-generator/explode_bridges.json +++ /dev/null @@ -1,46 +0,0 @@ -[{ - "type": { - "name": "Boolean", - "vararg": false - }, - "approximation": "Boolean", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "DataFrame", - "vararg": false - }, - "approximation": "PluginDataFrameSchema", - "converter": "dataFrame", - "lens": "Schema", - "supported": true -}, { - "type": { - "name": "AnyCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "InsertClause", - "vararg": false - }, - "approximation": "InsertClauseApproximation", - "converter": "insertClause", - "lens": "Value", - "supported": true -}] diff --git a/bridge-generator/gradle/wrapper/gradle-wrapper.jar b/bridge-generator/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 41d9927a4d..0000000000 Binary files a/bridge-generator/gradle/wrapper/gradle-wrapper.jar and /dev/null differ diff --git a/bridge-generator/gradle/wrapper/gradle-wrapper.properties b/bridge-generator/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 41dfb87909..0000000000 --- a/bridge-generator/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists diff --git a/bridge-generator/settings.gradle.kts b/bridge-generator/settings.gradle.kts deleted file mode 100644 index 281dd0fb1d..0000000000 --- a/bridge-generator/settings.gradle.kts +++ /dev/null @@ -1,16 +0,0 @@ -pluginManagement { - includeBuild("../") { - - } - repositories { - maven("https://maven.pkg.jetbrains.space/kotlin/p/kotlin/bootstrap") - mavenLocal() - gradlePluginPortal() - } -} - -includeBuild("../") { - dependencySubstitution { - substitute(module("org.jetbrains.kotlinx:dataframe")).using(project(":")) - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/add.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/add.kt deleted file mode 100644 index 786a520e8a..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/add.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin - -import generateDfFunctionTestStub -import org.jetbrains.kotlinx.dataframe.KotlinTypeFacade -import org.jetbrains.kotlinx.dataframe.api.add -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf - -object AddData { - fun KotlinTypeFacade.test0(): Pair { - val schemaName = "Add0" - val modify = "add(\"\") { 42 }" - val id = "add0" - return generateDfFunctionTestStub( - expression = { dataFrameOf("a")(1) }, - schemaName = schemaName, - modify = { it.add("") { 42 } }, - modifyRepr = modify, - id = id, - file = "add.kt" - ) - } - private val KotlinTypeFacade.test0Data get() = test0() - val KotlinTypeFacade.test0Schema get() = test0Data.first - val KotlinTypeFacade.test0After get() = test0Data.second -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/bridges.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/bridges.kt deleted file mode 100644 index 46c9ba53a8..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/bridges.kt +++ /dev/null @@ -1,10 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.api.cast -import org.jetbrains.kotlinx.dataframe.io.readJson -import org.jetbrains.kotlinx.dataframe.plugin.model.Bridge - -val bridges by lazy { DataFrame.readJson("/bridges.json".resource()).cast(verify = true) } - -fun String.resource() = object {}.javaClass.getResource(this)!! diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateDfFunctionTestStub.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateDfFunctionTestStub.kt deleted file mode 100644 index abeaa228df..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateDfFunctionTestStub.kt +++ /dev/null @@ -1,61 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.KotlinTypeFacade -import org.jetbrains.kotlinx.dataframe.api.schema -import org.jetbrains.kotlinx.dataframe.plugin.PluginDataFrameSchema -import org.jetbrains.kotlinx.dataframe.plugin.accept -import org.jetbrains.kotlinx.dataframe.plugin.generateSchemaDeclaration -import org.jetbrains.kotlinx.dataframe.plugin.pluginSchema - -internal fun KotlinTypeFacade.generateDfFunctionTestStub( - expression: () -> DataFrame<*>, - schemaName: String, - modify: (DataFrame<*>) -> DataFrame<*>, - modifyRepr: String, - id: String, - file: String -): Pair { - // region schema before - val df = expression() - - val declarationBefore = df.generateSchemaDeclaration(schemaName) - val pluginSchema = df.pluginSchema() - // endregion - - - val dfRes = modify(df) - val schemaTestCode = dfRes.schema().columns.accept("df1").joinToString("\n") - //repl.exec(schemaTestCode) - val afterPluginSchema = dfRes.pluginSchema() - - printCompilerTest(file, schemaName, declarationBefore, schemaTestCode, modifyRepr, id) - - return pluginSchema to afterPluginSchema -} - -private fun printCompilerTest(file: String, schemaName: String, schemaDeclaration: String, schemaTestCode: String, modify: String, id: String) { - println(file) - val test = buildString { - appendLine(""" - import org.jetbrains.kotlinx.dataframe.* - import org.jetbrains.kotlinx.dataframe.api.* - import org.jetbrains.kotlinx.dataframe.annotations.* - import org.jetbrains.kotlinx.dataframe.plugin.testing.* - """.trimIndent()) - appendLine() - appendLine(schemaDeclaration) - appendLine() - appendLine(""" - fun $id(df: DataFrame<$schemaName>) { - test(id = "${id}_schema", call = df) - val df1 = test(id = "$id", call = df.$modify) - """.trimIndent()) - appendLine(schemaTestCode.prependIndent()) - append("}") - } - println(test) - //println() - //println(""" - // "${id}_schema" to pluginJsonFormat.decodeFromString(${"\"\"\""}$before${"\"\"\""}), - // "$id" to pluginJsonFormat.decodeFromString(${"\"\"\""}$after${"\"\"\""}), - //""".trimIndent()) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateSchemaTestStub.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateSchemaTestStub.kt deleted file mode 100644 index ddbed74836..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/generateSchemaTestStub.kt +++ /dev/null @@ -1,88 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.codeGen - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.KotlinTypeFacade -import org.jetbrains.kotlinx.dataframe.api.column -import org.jetbrains.kotlinx.dataframe.api.first -import org.jetbrains.kotlinx.dataframe.plugin.PluginDataFrameSchema -import org.jetbrains.kotlinx.dataframe.plugin.bridges -import org.jetbrains.kotlinx.dataframe.plugin.generateSchemaDeclaration -import org.jetbrains.kotlinx.dataframe.plugin.generateTestCode -import org.jetbrains.kotlinx.dataframe.plugin.model.name -import org.jetbrains.kotlinx.dataframe.plugin.model.type -import org.jetbrains.kotlinx.dataframe.plugin.pluginSchema -import java.util.* - -fun KotlinTypeFacade.generateSchemaTestStub(name: String, expression: () -> DataFrame<*>): PluginDataFrameSchema { - val approximation by column() - fun writeInterpreter(s: String) { - // val root = File("/home/nikita/IdeaProjects/dataframe/core/src/main") -// val schemaRender = File(root, "kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender").also { it.mkdirs() } -// File(schemaRender, "$name.kt").writeText(s) - println(s) - } - - fun writeTestStub(s: String) { - // val root = File("/home/nikita/Downloads/kotlin/plugins/kotlin-dataframe") -// val schemaRender = File(root, "testData/diagnostics/schemaRender").also { it.mkdirs() } -// File(schemaRender, "$name.kt") - println(s) - } - - val capitalizedName = name.replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() } - -// val repl = object : JupyterReplTestCase() { -// } - val df = expression() -// val df = repl.execRaw("val df = $expression; df") as DataFrame<*> - val declaration = df.generateSchemaDeclaration(capitalizedName) - val schemaTestCode = df.generateTestCode() - //repl.exec(schemaTestCode) - - val pluginSchema = df.pluginSchema() - //val jsonString = pluginSchema.toJson() - - - bridges.first { it.type.name == "DataFrame" }.run { - writeInterpreter(""" - package org.jetbrains.kotlinx.dataframe.plugin.testing.schemaRender - - import kotlinx.serialization.decodeFromString - import org.jetbrains.kotlinx.dataframe.DataFrame - import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter - import org.jetbrains.kotlinx.dataframe.annotations.Arguments - import org.jetbrains.kotlinx.dataframe.annotations.Interpretable - import org.jetbrains.kotlinx.dataframe.plugin.* - - @Interpretable("${capitalizedName}") - public fun $name(): DataFrame<*> { - return TODO("won't run") - } - - public class ${capitalizedName} : AbstractInterpreter<$approximation>() { - override fun Arguments.interpret(): $approximation { - return SchemaData.$name() - } - } - """.trimIndent()) - } - val schemaDeclaration = declaration.lineSequence().joinToString("\n|") - writeTestStub(""" - |import org.jetbrains.kotlinx.dataframe.* - |import org.jetbrains.kotlinx.dataframe.api.* - |import org.jetbrains.kotlinx.dataframe.annotations.* - |import org.jetbrains.kotlinx.dataframe.plugin.testing.* - |import org.jetbrains.kotlinx.dataframe.plugin.testing.schemaRender.* - | - |/* - |$schemaDeclaration - |*/ - | - |internal fun schemaTest() { - | val df = $name() - | ${schemaTestCode} - |} - """.trimMargin()) - - return pluginSchema - } diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Bridge.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Bridge.kt deleted file mode 100644 index 28db4ebe91..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Bridge.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema - -@DataSchema -class Bridge(val type: Type, - val approximation: String, - val converter: String, - val lens: String, - val supported: Boolean = false) : DataRowSchema diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/ClassDeclaration.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/ClassDeclaration.kt deleted file mode 100644 index 09adde08a4..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/ClassDeclaration.kt +++ /dev/null @@ -1,15 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.annotations.GenerateConstructor -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema -import org.jetbrains.kotlinx.dataframe.plugin.model.Parameter - -@DataSchema -interface ClassDeclaration : DataRowSchema { - val name: String - val parameters: List - - @GenerateConstructor - companion object -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Function.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Function.kt deleted file mode 100644 index fac03419f6..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Function.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema - -@DataSchema -class Function( - val receiverType: String, - val function: String, - val functionReturnType: Type, - val parameters: List -) : DataRowSchema { -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Parameter.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Parameter.kt deleted file mode 100644 index dc0ed407c3..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Parameter.kt +++ /dev/null @@ -1,11 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema - -@DataSchema -class Parameter( - val name: String, - val returnType: Type, - val defaultValue: String?, -) : DataRowSchema diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/RefinedFunction.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/RefinedFunction.kt deleted file mode 100644 index 9441b8dd61..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/RefinedFunction.kt +++ /dev/null @@ -1,13 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema - -@DataSchema -class RefinedFunction( - val receiverType: String, - val function: String, - val functionReturnType: Type, - val parameters: List, - val startingSchema: Parameter -) : DataRowSchema diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/TestCase.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/TestCase.kt deleted file mode 100644 index 6e1e179b64..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/TestCase.kt +++ /dev/null @@ -1,14 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.annotations.GenerateConstructor -import org.jetbrains.kotlinx.dataframe.api.DataRowSchema - -@DataSchema -interface TestCase : DataRowSchema { - val dfExpression: String - val functionCalls: List - - @GenerateConstructor - companion object -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Type.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Type.kt deleted file mode 100644 index 74a6e1075a..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/model/Type.kt +++ /dev/null @@ -1,6 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.model - -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema - -@DataSchema -data class Type(val name: String, val vararg: Boolean) diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/schema.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/schema.kt deleted file mode 100644 index 7e51d24aa9..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/schema.kt +++ /dev/null @@ -1,29 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.KotlinTypeFacade -import org.jetbrains.kotlinx.dataframe.api.columnOf -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.io.readJson -import org.jetbrains.kotlinx.dataframe.plugin.codeGen.generateSchemaTestStub - -object SchemaData { - fun KotlinTypeFacade.schema1(): PluginDataFrameSchema = generateSchemaTestStub( - name = "schema1" - ) { - DataFrame.readJson("/functions.json".resource()) - } - - fun KotlinTypeFacade.schema2(): PluginDataFrameSchema = generateSchemaTestStub( - name = "schema2" - ) { - val name by columnOf("name") - val returnType by columnOf("") - val df = dataFrameOf(name, returnType) - val functions by columnOf(df) - val function by columnOf(name, returnType) - val nestedGroup by columnOf(name) - val group by columnOf(nestedGroup) - dataFrameOf(name, functions, function, group) - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/addExpression.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/addExpression.kt deleted file mode 100644 index 5763e46664..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/addExpression.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.TypeApproximation -import org.jetbrains.kotlinx.dataframe.api.AddExpression -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("AddExpressionIdentity") -public fun addExpression(v: AddExpression): AddExpression { - return v -} - -public class AddExpressionIdentity : AbstractInterpreter() { - internal val Arguments.v: TypeApproximation by type() - override fun Arguments.interpret(): TypeApproximation { - return v - } -} - -internal fun addExpressionTest() { - test(id = "addExpression_1", call = addExpression { 42 }) - test(id = "addExpression_2", call = addExpression { 42 }) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector.kt deleted file mode 100644 index 39b3b1cdb5..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector.kt +++ /dev/null @@ -1,43 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.ColumnsContainer -import org.jetbrains.kotlinx.dataframe.ColumnsSelector -import org.jetbrains.kotlinx.dataframe.DataColumn -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.Interpreter -import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("ColumnsSelectorIdentity") -public fun columnsSelector(v: ColumnsSelector): ColumnsSelector { - return v -} - -public class ColumnsSelectorIdentity : AbstractInterpreter>() { - internal val Arguments.v: List by arg(lens = Interpreter.Value) - override fun Arguments.interpret(): List { - return v - } -} - -internal interface Schema0 { - val intField: Int - val group: Group0 -} - -internal interface Group0 { - val stringField: String -} - -internal val ColumnsContainer.intField: DataColumn get() = TODO() -internal val ColumnsContainer.group: ColumnGroup get() = TODO() -internal val ColumnsContainer.stringField: DataColumn get() = TODO() - -internal fun columnsSelectorTest() { - test(id = "columnsSelector_1", call = columnsSelector { intField }) - test(id = "columnsSelector_2", call = columnsSelector { group.stringField }) - test(id = "columnsSelector_3", call = columnsSelector { intField and group.stringField }) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame.kt deleted file mode 100644 index 8573f0d918..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame.kt +++ /dev/null @@ -1,33 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.api.cast -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.plugin.PluginDataFrameSchema -import org.jetbrains.kotlinx.dataframe.plugin.dataFrame -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("DataFrameIdentity") -public fun dataFrame(v: DataFrame<*>): DataFrame<*> { - return v -} - -public class DataFrameIdentity : AbstractInterpreter() { - public val Arguments.v: PluginDataFrameSchema by dataFrame() - - override fun Arguments.interpret(): PluginDataFrameSchema { - return v - } -} - -internal interface Schema1 { - val i: Int -} - -internal fun injectionScope() { - val df = dataFrameOf("i")(1, 2, 3).cast() - test(id = "dataFrame_1", call = dataFrame(df)) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/enum.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/enum.kt deleted file mode 100644 index 07ad7bdfa0..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/enum.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.api.Infer -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("EnumIdentity") -public fun enum(v: Infer): Infer { - return v -} - -public class EnumIdentity : AbstractInterpreter() { - internal val Arguments.v: Infer by enum() - - override fun Arguments.interpret(): Infer { - return v - } -} - -internal fun enumTest() { - test(id = "enum_1", enum(Infer.Type)) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/insertClause.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/insertClause.kt deleted file mode 100644 index a08295ce12..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/insertClause.kt +++ /dev/null @@ -1,35 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.api.InsertClause -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.api.insert -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.InsertClauseApproximation -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("InsertClauseIdentity") -public fun insertClause(v: InsertClause): InsertClause { - return v -} - -internal class InsertClauseIdentity : AbstractInterpreter() { - internal val Arguments.v: InsertClauseApproximation by insertClause() - - override fun Arguments.interpret(): InsertClauseApproximation { - return v - } -} - -internal fun insertClauseTest() { - val df = dataFrameOf("a")(1) - test(id = "insert_1", call = df.insert("b") { 42 }) -} - -internal fun main() { - val df = dataFrameOf("a")(1) - val insertClause = df.insert("b") { 42 } - insertClause -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/interpretationError.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/interpretationError.kt deleted file mode 100644 index fd7ee18343..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/interpretationError.kt +++ /dev/null @@ -1,15 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable - -@Interpretable("InterpretationError") -fun interpretationError() {} - -class InterpretationError : AbstractInterpreter() { - override fun Arguments.interpret() { - error("Hi") - } -} - diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kotlinPrimitive.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kotlinPrimitive.kt deleted file mode 100644 index c056d2558f..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kotlinPrimitive.kt +++ /dev/null @@ -1,18 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable - -@Interpretable("KotlinPrimitive") -public fun kotlinPrimitive(v: Any?): Any? { - return v -} - -public class KotlinPrimitive : AbstractInterpreter() { - public val Arguments.v: Any? by arg() - - override fun Arguments.interpret(): Any? { - return v - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kproperty.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kproperty.kt deleted file mode 100644 index f8c2ac1baa..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kproperty.kt +++ /dev/null @@ -1,33 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.ColumnName -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.test -import kotlin.reflect.KProperty - -@Interpretable("KpropertyIdentity") -public fun kproperty(v: KProperty): KProperty { - return v -} - -public class KpropertyIdentity : AbstractInterpreter() { - internal val Arguments.v: KPropertyApproximation by kproperty() - - override fun Arguments.interpret(): KPropertyApproximation { - return v - } -} - -internal interface Schema { - val i: Int - @ColumnName("name") - val wwff: Int -} - -internal fun kpropertyTest() { - test(id = "kproperty_1", kproperty(Schema::i)) - test(id = "kproperty_2", kproperty(Schema::wwff)) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/memberFunction.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/memberFunction.kt deleted file mode 100644 index f6b31c9058..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/memberFunction.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable - -public data class Context @Interpretable("ContextConstructor") constructor(val i: Int) { - @Interpretable("MemberFunctionId") - public fun id(): Context = this -} - -internal class ContextConstructor : AbstractInterpreter() { - val Arguments.i: Int by arg() - override fun Arguments.interpret(): Context { - return Context(i) - } -} - -internal class MemberFunctionId : AbstractInterpreter() { - val Arguments.receiver: Context by arg() - - override fun Arguments.interpret(): Context { - return receiver - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/rowValueExpression.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/rowValueExpression.kt deleted file mode 100644 index b36c961224..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/rowValueExpression.kt +++ /dev/null @@ -1,25 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.RowValueExpression -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.TypeApproximation -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -@Interpretable("RowValueExpressionIdentity") -public fun rowValueExpression(v: RowValueExpression): RowValueExpression { - return v -} - -public class RowValueExpressionIdentity : AbstractInterpreter() { - internal val Arguments.v: TypeApproximation by type() - override fun Arguments.interpret(): TypeApproximation { - return v - } -} - -internal fun rowValueExpressionTest() { - test(id = "rowValueExpression_1", rowValueExpression { 42 }) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/type.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/type.kt deleted file mode 100644 index 886c4fe4ae..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/type.kt +++ /dev/null @@ -1,26 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.RowExpression -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.TypeApproximation -import org.jetbrains.kotlinx.dataframe.plugin.testing.test -import org.jetbrains.kotlinx.dataframe.plugin.type - -@Interpretable("TypeIdentity") -public fun type(v: RowExpression): RowExpression { - return v -} - -public class TypeIdentity : AbstractInterpreter() { - internal val Arguments.v: TypeApproximation by type() - - override fun Arguments.interpret(): TypeApproximation { - return v - } -} - -internal fun typeTest() { - test(id = "type_1", call = type { 42 }) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/typeParameter.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/typeParameter.kt deleted file mode 100644 index 79dbd4fb81..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/typeParameter.kt +++ /dev/null @@ -1,34 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.TypeApproximation -import org.jetbrains.kotlinx.dataframe.plugin.testing.test - -//public data class Context @Interpretable("ContextConstructor") constructor(val i: Int) { -// @Interpretable("MemberFunctionId") -// public fun id(): Context = this -//} -// -//internal class ContextConstructor : AbstractInterpreter() { -// val Arguments.i: Int by arg() -// override fun Arguments.interpret(): Context { -// return Context(i) -// } -//} - -@Interpretable("TypeParameterId") -public fun typeParameter() { } - -internal class TypeParameterId : AbstractInterpreter() { - val Arguments.typeArg0: TypeApproximation by arg() - - override fun Arguments.interpret(): TypeApproximation { - return typeArg0 - } -} - -internal fun testTypeParameter() { - test(id = "typeParameter_1", call = typeParameter()) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/varargKProperty.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/varargKProperty.kt deleted file mode 100644 index 90e224cdd8..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/varargKProperty.kt +++ /dev/null @@ -1,30 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.atoms - -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.annotations.TypeApproximation -import org.jetbrains.kotlinx.dataframe.plugin.testing.test -import kotlin.reflect.KProperty - -@Interpretable("VarargKPropertyIdentity") -public fun varargKProperty(vararg v: KProperty): Array> { - return v -} - -public class VarargKPropertyIdentity : AbstractInterpreter>() { - internal val Arguments.v: List by arg() - override fun Arguments.interpret(): List { - return v - } -} - -internal interface KProperties { - val col1: Int - val col2: Int? - val col3: Any? -} - -internal fun varargKPropertyTest() { - test(id = "varargKProperty_0", call = varargKProperty(KProperties::col1, KProperties::col2)) -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema1.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema1.kt deleted file mode 100644 index efc3f0d485..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema1.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.schemaRender - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.plugin.PluginDataFrameSchema -import org.jetbrains.kotlinx.dataframe.plugin.SchemaData.schema1 - -@Interpretable("Schema1") -public fun schema1(): DataFrame<*> { - return TODO("won't run") -} - -public class Schema1 : AbstractInterpreter() { - override fun Arguments.interpret(): PluginDataFrameSchema { - return schema1() - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema2.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema2.kt deleted file mode 100644 index d94ef974c5..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/schemaRender/Schema2.kt +++ /dev/null @@ -1,19 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing.schemaRender - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter -import org.jetbrains.kotlinx.dataframe.annotations.Arguments -import org.jetbrains.kotlinx.dataframe.annotations.Interpretable -import org.jetbrains.kotlinx.dataframe.plugin.* -import org.jetbrains.kotlinx.dataframe.plugin.SchemaData.schema2 - -@Interpretable("Schema2") -public fun schema2(): DataFrame<*> { - return TODO("won't run") -} - -public class Schema2 : AbstractInterpreter() { - override fun Arguments.interpret(): PluginDataFrameSchema { - return schema2() - } -} diff --git a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/test.kt b/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/test.kt deleted file mode 100644 index fe394271da..0000000000 --- a/bridge-generator/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/test.kt +++ /dev/null @@ -1,4 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.testing - -@Suppress("UNUSED_PARAMETER") -public fun test(id: String, call: T): T { return call } diff --git a/bridge-generator/src/main/resources/bridges.json b/bridge-generator/src/main/resources/bridges.json deleted file mode 100644 index 14ff77f96c..0000000000 --- a/bridge-generator/src/main/resources/bridges.json +++ /dev/null @@ -1,208 +0,0 @@ -[{ - "type": { - "name": "DataColumn", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "DataFrame", - "vararg": false - }, - "approximation": "PluginDataFrameSchema", - "converter": "dataFrame", - "lens": "Schema", - "supported": true -}, { - "type": { - "name": "String", - "vararg": false - }, - "approximation": "String", - "converter": "string", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "Infer", - "vararg": false - }, - "approximation": "Infer", - "converter": "enum", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "RowExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "ColumnAccessor", - "vararg": false - }, - "approximation": "ColumnAccessorApproximation", - "converter": "columnAccessor", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "KProperty", - "vararg": false - }, - "approximation": "KPropertyApproximation", - "converter": "kproperty", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnSelector", - "vararg": false - }, - "approximation": "ColumnWithPathApproximation", - "converter": "columnWithPath", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "InsertClause", - "vararg": false - }, - "approximation": "InsertClauseApproximation", - "converter": "insertClause", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnPath", - "vararg": false - }, - "approximation": "ColumnPathApproximation", - "converter": "columnPath", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "ColumnAccessor<*>", - "vararg": false - }, - "approximation": "ColumnAccessorApproximation", - "converter": "columnAccessor", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "KProperty<*>", - "vararg": false - }, - "approximation": "KPropertyApproximation", - "converter": "kproperty", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "AddExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "KProperty", - "vararg": true - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "String", - "vararg": true - }, - "approximation": "List", - "converter": "varargString", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "Convert", - "vararg": false - }, - "approximation": "ConvertApproximation", - "converter": "arg", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "AnyCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "dataColumn", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "RowValueExpression", - "vararg": false - }, - "approximation": "TypeApproximation", - "converter": "type", - "lens": "ReturnType", - "supported": true -}, { - "type": { - "name": "DataFrame.(DataColumn) -> AnyBaseCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnSet", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": false -}, { - "type": { - "name": "Boolean", - "vararg": false - }, - "approximation": "Boolean", - "converter": "arg", - "lens": "Value", - "supported": true -}, { - "type": { - "name": "ColumnsSelector", - "vararg": false - }, - "approximation": "List", - "converter": "arg", - "lens": "Value", - "supported": true -}] \ No newline at end of file diff --git a/bridge-generator/src/main/resources/functions.json b/bridge-generator/src/main/resources/functions.json deleted file mode 100644 index 4d79c784fd..0000000000 --- a/bridge-generator/src/main/resources/functions.json +++ /dev/null @@ -1 +0,0 @@ -[{"id":0,"function":"insert","functionReturnType":"InsertClause","parameters":[{"name":"column","returnType":"DataColumn"},{"name":"","returnType":"DataFrame"}],"receiverType":"DataFrame"},{"id":1,"function":"insert","functionReturnType":"InsertClause","parameters":[{"name":"name","returnType":"String"},{"defaultValue":"Infer.Nulls","name":"infer","returnType":"Infer"},{"name":"expression","returnType":"RowExpression"},{"name":"","returnType":"DataFrame"}],"receiverType":"DataFrame"},{"id":2,"function":"insert","functionReturnType":"InsertClause","parameters":[{"name":"column","returnType":"ColumnAccessor"},{"defaultValue":"Infer.Nulls","name":"infer","returnType":"Infer"},{"name":"expression","returnType":"RowExpression"},{"name":"","returnType":"DataFrame"}],"receiverType":"DataFrame"},{"id":3,"function":"insert","functionReturnType":"InsertClause","parameters":[{"name":"column","returnType":"KProperty"},{"defaultValue":"Infer.Nulls","name":"infer","returnType":"Infer"},{"name":"expression","returnType":"RowExpression"},{"name":"","returnType":"DataFrame"}],"receiverType":"DataFrame"},{"id":0,"function":"under","functionReturnType":"DataFrame","parameters":[{"name":"column","returnType":"ColumnSelector"},{"name":"","returnType":"InsertClause"}],"receiverType":"InsertClause"},{"id":1,"function":"under","functionReturnType":"DataFrame","parameters":[{"name":"columnPath","returnType":"ColumnPath"},{"name":"","returnType":"InsertClause"}],"receiverType":"InsertClause"},{"id":2,"function":"under","functionReturnType":"DataFrame","parameters":[{"name":"column","returnType":"ColumnAccessor<*>"},{"name":"","returnType":"InsertClause"}],"receiverType":"InsertClause"},{"id":3,"function":"under","functionReturnType":"DataFrame","parameters":[{"name":"column","returnType":"KProperty<*>"},{"name":"","returnType":"InsertClause"}],"receiverType":"InsertClause"},{"id":4,"function":"under","functionReturnType":"DataFrame","parameters":[{"name":"column","returnType":"String"},{"name":"","returnType":"InsertClause"}],"receiverType":"InsertClause"}] \ No newline at end of file diff --git a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/Prototype.kt b/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/Prototype.kt deleted file mode 100644 index 8ba7929a5f..0000000000 --- a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/Prototype.kt +++ /dev/null @@ -1,476 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.codeGen - -import io.kotest.matchers.shouldBe -import kotlinx.serialization.decodeFromString -import kotlinx.serialization.encodeToString -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.annotations.DataSchema -import org.jetbrains.kotlinx.dataframe.api.add -import org.jetbrains.kotlinx.dataframe.api.addId -import org.jetbrains.kotlinx.dataframe.api.all -import org.jetbrains.kotlinx.dataframe.api.append -import org.jetbrains.kotlinx.dataframe.api.asColumnGroup -import org.jetbrains.kotlinx.dataframe.api.asIterable -import org.jetbrains.kotlinx.dataframe.api.cast -import org.jetbrains.kotlinx.dataframe.api.column -import org.jetbrains.kotlinx.dataframe.api.columnGroup -import org.jetbrains.kotlinx.dataframe.api.columnOf -import org.jetbrains.kotlinx.dataframe.api.concat -import org.jetbrains.kotlinx.dataframe.api.convert -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.api.distinct -import org.jetbrains.kotlinx.dataframe.api.distinctBy -import org.jetbrains.kotlinx.dataframe.api.emptyDataFrame -import org.jetbrains.kotlinx.dataframe.api.explode -import org.jetbrains.kotlinx.dataframe.api.expr -import org.jetbrains.kotlinx.dataframe.api.fillNulls -import org.jetbrains.kotlinx.dataframe.api.filter -import org.jetbrains.kotlinx.dataframe.api.first -import org.jetbrains.kotlinx.dataframe.api.forEach -import org.jetbrains.kotlinx.dataframe.api.groupBy -import org.jetbrains.kotlinx.dataframe.api.join -import org.jetbrains.kotlinx.dataframe.api.leftJoin -import org.jetbrains.kotlinx.dataframe.api.map -import org.jetbrains.kotlinx.dataframe.api.mapToColumn -import org.jetbrains.kotlinx.dataframe.api.print -import org.jetbrains.kotlinx.dataframe.api.remove -import org.jetbrains.kotlinx.dataframe.api.rows -import org.jetbrains.kotlinx.dataframe.api.schema -import org.jetbrains.kotlinx.dataframe.api.select -import org.jetbrains.kotlinx.dataframe.api.toDataFrame -import org.jetbrains.kotlinx.dataframe.api.ungroup -import org.jetbrains.kotlinx.dataframe.api.update -import org.jetbrains.kotlinx.dataframe.api.with -import org.jetbrains.kotlinx.dataframe.columns.ColumnGroup -import org.jetbrains.kotlinx.dataframe.io.readJson -import org.jetbrains.kotlinx.dataframe.plugin.PluginDataFrameSchema -import org.jetbrains.kotlinx.dataframe.plugin.model.Bridge -import org.jetbrains.kotlinx.dataframe.plugin.model.Function -import org.jetbrains.kotlinx.dataframe.plugin.model.Parameter -import org.jetbrains.kotlinx.dataframe.plugin.model.RefinedFunction -import org.jetbrains.kotlinx.dataframe.plugin.model.* -import org.jetbrains.kotlinx.dataframe.plugin.pluginJsonFormat -import org.jetbrains.kotlinx.dataframe.plugin.resource -import org.junit.jupiter.api.Test -import java.io.File -import java.util.* - -val bridges by lazy { DataFrame.readJson("/bridges.json".resource()).cast(verify = true) } - -val classes = dataFrameOf( - ClassDeclaration("InsertClause", listOf( - Parameter("df", Type("DataFrame", false), null), - Parameter("column", Type("AnyCol", false), null), - )), -) - -class Prototype { - - /** - * also this: - * @see DataFrame.distinctBy - */ - @Test - fun `print link to the sources`() { - println(".(mappings.kt:5)") - println(".(move.kt:5)") - println("kotlin/org/jetbrains/kotlinx/dataframe/plugin/ColumnAccessorApproximation.kt :10") - println("/home/nikita/IdeaProjects/dataframe/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/plugin/ColumnAccessorApproximation.kt :10") - - } - - val otherFunctions = dataFrameOf( - Function("DataFrame", "insert", Type("InsertClause", false), listOf(Parameter("column", Type("DataColumn", false), null))), - Function("DataFrame", "insert", Type("InsertClause", false), listOf( - Parameter("name", Type("String", false), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowExpression", false), null) - )), - Function("DataFrame", "insert", Type("InsertClause", false), listOf( - Parameter("column", Type("ColumnAccessor", false), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowExpression", false), null) - )), - Function("DataFrame", "insert", Type("InsertClause", false), listOf( - Parameter("column", Type("KProperty", false), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowExpression", false), null) - )), - ) - - val dfFunctions = dataFrameOf( - /** - * @see InsertClause.under - */ - Function("InsertClause", "under", Type("DataFrame", false), listOf( - Parameter("column", Type("ColumnSelector", false), null) - )), - Function("InsertClause", "under", Type("DataFrame", false), listOf( - Parameter("columnPath", Type("ColumnPath", false), null) - )), - Function("InsertClause", "under", Type("DataFrame", false), listOf( - Parameter("column", Type("ColumnAccessor<*>", false), null) - )), - Function("InsertClause", "under", Type("DataFrame", false), listOf( - Parameter("column", Type("KProperty<*>", false), null) - )), - Function("InsertClause", "under", Type("DataFrame", false), listOf( - Parameter("column", Type("String", false), null) - )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "add", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("columns", Type("AnyBaseCol", vararg = true), null) -// )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "addAll", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("columns", Type("Iterable", false), null) -// )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "addAll", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("dataFrames", Type("AnyFrame", vararg = true), null) -// )), - Function("DataFrame", "add", Type("DataFrame", false), listOf( - Parameter("name", Type("String", false), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("AddExpression", false), null), - )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "add", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("property", Type("KProperty", false), null), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("infer", Type("Infer", false), "Infer.Nulls"), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("expression", Type("AddExpression", false), null), -// )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "add", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("column", Type("ColumnAccessor", false), null), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("infer", Type("Infer", false), "Infer.Nulls"), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("expression", Type("AddExpression", false), null), -// )), -// org.jetbrains.kotlinx.dataframe.plugin.model.Function("DataFrame", "add", Type("DataFrame", false), listOf( -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("path", Type("ColumnPath", false), null), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("infer", Type("Infer", false), "Infer.Nulls"), -// org.jetbrains.kotlinx.dataframe.plugin.model.Parameter("expression", Type("AddExpression", false), null), -// )), - ) - - - private val functions = (otherFunctions concat dfFunctions).appendReceiverAndId() - - // region classes - - // "val df: DataFrame, val column: AnyCol" - - // endregion - - val uniqueReturnTypes: ColumnGroup = functions.collectUsedTypes(classes) - - @Test - fun `class cast exception`() { - val returnType by column() - // when actual returnType is in fact ColumnGroup, not DataColumn - // compiler doesn't complain, but it's an error - val res = functions - .explode { parameters } - .ungroup { parameters }[returnType] - res.map { it.name } - - // and we can do this, still no error - //res.concat(functions.functionReturnType.toListOf().toColumn("")) - } - - @Test - fun `generate bridges`() { - uniqueReturnTypes.joinBridges(bridges, verify = true) - } - - @Test - fun `join removes column from column group`() { - val a by columnOf(1) - val group by columnOf(a) - - val groupReference by columnGroup("group") - val aa by groupReference.column("a") - - val df = dataFrameOf(a) - val df1 = dataFrameOf(group) - val res = df.join(df1) { - "a".match(aa.map { it }) - } - - val res1 = df.join(df1) { - "a".match(aa) - } - println(res1.schema()) - } - - @DataSchema - class Data(val a: Int) - class Record(val data: Data) - - @Test - fun `cast and convert error should print schema maybe`() { - val b by columnOf(1) - val data by columnOf(b) - dataFrameOf(data).cast(verify = true) - } - - // region bridges - val type by column() - - val refinedFunctions = functions.refine(bridges) - - // endregion - - /** - * @see ConvertInterpreter - */ - @Test - fun `generate interpreters`() { - refinedFunctions.generateInterpreters() - } - - @Test - fun `generate approximations`() { - val approximation by column() - val df = classes - .leftJoin(bridges) { name.match(right.type.name) } - .convert { parameters }.with { - it.leftJoin(bridges) { returnType.match(right.type) } - } - .add("code") { - val parameters = parameters.rows().joinToString(", ") { "val ${it.name}: ${it["approximation"]}" } - "internal class ${approximation()}($parameters)" - } - - println(df["code"].toList()) - - } - - @Test - fun `generate atoms tests`() { - bridges.generateAtomsTests() - } - - //dataFrameOf\((".+",?)+\)\(.*\) - - @Test - fun printFunctionsThatShouldWork() { - val supportedFunctions = functions - .leftJoin(bridges) { functionReturnType.name.match(right.type.name) } - .convert { parameters }.with { - it.leftJoin(bridges) { - it.returnType.name.match(right.type.name) - } - } - .also { - it.forEach { - parameters.print() - } - } - .filter { - it.parameters.all { it[Bridge::supported] } - } - - supportedFunctions - .remove(Bridge::supported, Bridge::lens, Bridge::converter, Bridge::approximation) - .convert { parameters }.with { df -> - df.map { - val default = it.defaultValue?.let { " = ${it}" } ?: "" - "${it.name}: ${it.returnType}$default" - } - } - .print(valueLimit = 500) - } - - @Test - fun `schema1 test`() { -// generateSchemaTestStub("schema1", "DataFrame.readJson(\"functions.json\")") - } - - @Test - fun `schema2 test`() { -// generateSchemaTestStub("schema2", """run { -// |val name by columnOf("name") -// |val returnType by columnOf("") -// |val df = dataFrameOf(name, returnType) -// |val functions by columnOf(df) -// |val function by columnOf(name, returnType) -// |val nestedGroup by columnOf(name) -// |val group by columnOf(nestedGroup) -// |dataFrameOf(name, functions, function, group) -// |}""".trimMargin()) - - } - - val root = File("build/tmp/prototype") - - - - val expressions = listOf( - """dataFrameOf("age")(17)""", - """dataFrameOf("name", "age")("Name", 17).group("name", "age").into("person")""", - """dataFrameOf("persons")(dataFrameOf("name", "age")("Name", 17).group("name", "age").into("person"))""" - ) - - // val expressions1 = dataFrameOf( -// Prototype.TestCase("""dataFrameOf("age", "name")(17, "Name")""", listOf( -// """df.insert("col1") { 42 }.after("age")""", -// """df.insert("col1") { 42 }.after("name")""" -// )), -// ) -} - -private val returnType by columnGroup() -fun DataFrame.collectUsedTypes( - classes: DataFrame = emptyDataFrame() -) = explode { parameters } - .ungroup { parameters }[returnType] - .concat(functionReturnType) - .concat( - classes - .select { parameters } - .explode { parameters } - .ungroup { parameters }[returnType] - ) - .concat(classes.name.distinct().map { Type(it, false) }.asIterable().toDataFrame()) - .distinct() - .asColumnGroup("type") - -fun ColumnGroup.joinBridges(bridges: DataFrame, verify: Boolean): DataFrame { - val df = dataFrameOf(this) - .leftJoin(bridges) { - // join keeps only left column!! - "type" match right.type - } - //.rename { "type"["type"] }.into("name") - .fillNulls("supported").with { false } - .remove("name", "vararg") - .cast(verify = verify) - - return df -} - -fun DataFrame.refine(bridges: DataFrame): DataFrame { - val functions = this - return functions.leftJoin(bridges) { - //functions.functionReturnType.match(type) TODO: Shouldn't compile - functions.functionReturnType.name.match(right.type.name) - } - .convert { parameters }.with { it.leftJoin(bridges) { it.returnType.match(right.type) } } - .add("startingSchema") { - parameters.first { it.name == "receiver" } - } - .cast() -} - -fun DataFrame.generateInterpreters() { - val approximation by column() - val converter by column() - val id by column() - println(this) - - val interpreters = convert { parameters }.with { - it.add("arguments") { - var defaultValue = it.defaultValue?.let { "defaultValue = Present($it)" } - if (defaultValue == null && it.returnType.vararg) { - defaultValue = "defaultValue = Present(emptyList())" - } - if (defaultValue == null) { - defaultValue = "" - } - "val Arguments.$name: ${approximation()} by ${converter()}($defaultValue)" - } - } - .add("argumentsStr") { - // generate deprecated property with name argumentStr? - buildString { - append(it.parameters["arguments"].values().joinToString("\n") { "| $it" }) - // how to handle nullable property? make all columns nullable? forbid it? - it.startingSchema.name?.let { - appendLine() - append(" override val Arguments.startingSchema get() = ${it}") - } - } - } - .add("interpreterName") { - val name = it.function.replaceFirstChar { it.uppercaseChar() } - "$name${it[id]}" - } - .mapToColumn("interpreters") { - """ - |internal class ${it["interpreterName"]} : AbstractInterpreter<${approximation()}>() { - ${it["argumentsStr"]} - | - | override fun Arguments.interpret(): ${approximation()} { - | TODO() - | } - |} - """.trimMargin() - } - println(interpreters.values().joinToString("\n\n")) -} - -fun PluginDataFrameSchema.toJson(): String { - val afterJson = pluginJsonFormat.encodeToString(this) - val decodedSchema = pluginJsonFormat.decodeFromString(afterJson) - decodedSchema shouldBe this - return afterJson -} - -fun DataFrame.appendReceiverAndId() = groupBy { function } - .updateGroups { it.addId() } - .concat() - .update { parameters }.with { - it.append(Parameter("receiver", Type(receiverType, false), null)) - } - -fun DataFrame.generateAtomsTests() { - - fun writeTestStub(name: String, s: String) { - // val root = TODO() -// val atoms = File(root, "kotlin/org/jetbrains/kotlinx/dataframe/plugin/testing/atoms").also { it.mkdirs() } -// File(atoms, "$name.kt").writeText(s) - println(s) - } - - val name by column() - distinctBy { expr { type.name.substringBefore("<") } and type.vararg } - .groupBy { converter } - .updateGroups { df -> - add(name) { - var name = type.name.substringBefore("<") - if (type.vararg) { - name = "Vararg$name" - } - name - } - } - .concat() - .filter { supported } - .forEach { - val testSubjectName = name().replaceFirstChar { it.lowercase() } - println(name()) - println() - val interpreterName = name() - writeTestStub(testSubjectName, """ - package org.jetbrains.kotlinx.dataframe.plugin.testing - - import org.jetbrains.kotlinx.dataframe.annotations.AbstractInterpreter - import org.jetbrains.kotlinx.dataframe.annotations.Arguments - import org.jetbrains.kotlinx.dataframe.annotations.Interpretable - import org.jetbrains.kotlinx.dataframe.plugin.* - - @Interpretable("${interpreterName}Identity") - public fun ${testSubjectName}(v: ${type.name}): ${type.name} { - return v - } - - public class ${interpreterName}Identity : AbstractInterpreter<$approximation>() { - internal val Arguments.v: $approximation by $converter(lens = Interpreter.$lens) - override fun Arguments.interpret(): $approximation { - return v - } - } - - internal fun ${testSubjectName}Test() { - - } - """.trimIndent()) - println() - } -} diff --git a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/add.kt b/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/add.kt deleted file mode 100644 index c9f31ec582..0000000000 --- a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/add.kt +++ /dev/null @@ -1,9 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.AddData -import org.junit.jupiter.api.Test - -class Add { - @Test - fun generateDfFunctionTestStub() { - //AddData.test0() - } -} diff --git a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/columnsSelectionDsl.kt b/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/columnsSelectionDsl.kt deleted file mode 100644 index 087b858097..0000000000 --- a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/columnsSelectionDsl.kt +++ /dev/null @@ -1,20 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.codeGen - -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.plugin.model.Function -import org.jetbrains.kotlinx.dataframe.plugin.model.Parameter -import org.jetbrains.kotlinx.dataframe.plugin.model.Type -import org.junit.jupiter.api.Test - -val columnSelectionDsl = dataFrameOf( - Function("ColumnSet", "and", Type("ColumnSet", vararg = false), listOf( - Parameter("other", Type("ColumnSet", vararg = false), null) - )), -) - -class ColumnSelectionDsl { - @Test - fun `selectors API`() { - columnSelectionDsl.generateAll("columnSelectionDsl_bridges.json") - } -} diff --git a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/convert.kt b/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/convert.kt deleted file mode 100644 index 2ae020fccb..0000000000 --- a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/convert.kt +++ /dev/null @@ -1,103 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.codeGen - -import org.jetbrains.kotlinx.dataframe.DataFrame -import org.jetbrains.kotlinx.dataframe.api.cast -import org.jetbrains.kotlinx.dataframe.api.concat -import org.jetbrains.kotlinx.dataframe.api.convertTo -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.api.distinct -import org.jetbrains.kotlinx.dataframe.api.filter -import org.jetbrains.kotlinx.dataframe.api.take -import org.jetbrains.kotlinx.dataframe.io.readJson -import org.jetbrains.kotlinx.dataframe.io.toJson -import org.jetbrains.kotlinx.dataframe.io.writeJson -import org.jetbrains.kotlinx.dataframe.plugin.model.Bridge -import org.jetbrains.kotlinx.dataframe.plugin.model.Function -import org.jetbrains.kotlinx.dataframe.plugin.model.Parameter -import org.jetbrains.kotlinx.dataframe.plugin.model.RefinedFunction -import org.jetbrains.kotlinx.dataframe.plugin.model.Type -import org.junit.jupiter.api.Test -import java.io.File - -val convert = dataFrameOf( - Function("DataFrame", "convert", Type("Convert", false), listOf( - Parameter("columns", Type("ColumnsSelector", false), null), - )), - Function("DataFrame", "convert", Type("Convert", false), listOf( - Parameter("columns", Type("KProperty", true), null), - )), - Function("DataFrame", "convert", Type("Convert", false), listOf( - Parameter("columns", Type("String", true), null), - )), - Function("DataFrame", "convert", Type("Convert", false), listOf( - Parameter("columns", Type("ColumnReference", true), null), - )), - Function("DataFrame", "convert", Type("DataFrame", false), listOf( - Parameter("firstCol", Type("ColumnReference", false), null), - Parameter("cols", Type("ColumnReference", true), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowValueExpression", false), null), - )), - Function("DataFrame", "convert", Type("DataFrame", false), listOf( - Parameter("firstCol", Type("KProperty", false), null), - Parameter("cols", Type("KProperty", true), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowValueExpression", false), null), - )), - Function("DataFrame", "convert", Type("DataFrame", false), listOf( - Parameter("firstCol", Type("String", false), null), - Parameter("cols", Type("String", true), null), - Parameter("infer", Type("Infer", false), "Infer.Nulls"), - Parameter("expression", Type("RowValueExpression", false), null), - )), -) - -val to = dataFrameOf( - Function("Convert", "to", Type("DataFrame", false), emptyList()), - Function("Convert", "to", Type("DataFrame", false), listOf( - Parameter("type", Type("KType", false), null) - )), - Function("Convert", "to", Type("DataFrame", false), listOf( - Parameter("columnConverter", Type("DataFrame.(DataColumn) -> AnyBaseCol", false), null) - )) -) - -class Convert { - @Test - fun `convert APIs`() { - convert.generateAll("convert_bridges.json") - } - - @Test - fun `to APIs`() { - to.generateAll("to_bridges.json") - } -} - -fun DataFrame.generateAll(batchBridgePath: String) { - val functions = appendReceiverAndId() - val types = functions.collectUsedTypes(classes.take(1)) - val rawBridges = types.joinBridges(bridges, verify = false) - File(batchBridgePath).let { - if (!it.exists()) { - rawBridges.writeJson(it, prettyPrint = true) - } else { - val json = rawBridges.filter { it["converter"] == null }.toJson(prettyPrint = true) - println(json) - } - } - - val editedBridges = DataFrame.readJson(batchBridgePath).cast(verify = true) - val allBridges = bridges.concat(editedBridges).distinct().cast(verify = true) - allBridges.writeJson("bridges.json", prettyPrint = true) - - val refine = functions - .refine(allBridges) - //.also { println(it.schema()) } - .convertTo() - //.also { println(it.schema()) } - //.cast(verify = true) - - editedBridges.generateAtomsTests() - refine.generateInterpreters() -} diff --git a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/explode.kt b/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/explode.kt deleted file mode 100644 index dc85338105..0000000000 --- a/bridge-generator/src/test/kotlin/org/jetbrains/kotlinx/dataframe/plugin/codeGen/explode.kt +++ /dev/null @@ -1,21 +0,0 @@ -package org.jetbrains.kotlinx.dataframe.plugin.codeGen - -import org.jetbrains.kotlinx.dataframe.api.dataFrameOf -import org.jetbrains.kotlinx.dataframe.plugin.model.Function -import org.jetbrains.kotlinx.dataframe.plugin.model.Parameter -import org.jetbrains.kotlinx.dataframe.plugin.model.Type -import org.junit.jupiter.api.Test - -val explode = dataFrameOf( - Function("DataFrame", "explode", Type("DataFrame", false), listOf( - Parameter("dropEmpty", Type("Boolean", false), "true"), - Parameter("selector", Type("ColumnsSelector", false), "receiver.columns()"), - )) -) - -class Explode { - @Test - fun `explode API`() { - explode.generateAll("explode_bridges.json") - } -} diff --git a/bridge-generator/to_bridges.json b/bridge-generator/to_bridges.json deleted file mode 100644 index ae074418f4..0000000000 --- a/bridge-generator/to_bridges.json +++ /dev/null @@ -1,10 +0,0 @@ -[{ - "type": { - "name": "DataFrame.(DataColumn) -> AnyBaseCol", - "vararg": false - }, - "approximation": "SimpleCol", - "converter": "arg", - "lens": "Value", - "supported": true -}] diff --git a/columnsSelectionDsl.ipynb b/columnsSelectionDsl.ipynb deleted file mode 100644 index 41036f8b75..0000000000 --- a/columnsSelectionDsl.ipynb +++ /dev/null @@ -1,41 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 2, - "id": "ed4615e4", - "metadata": {}, - "outputs": [], - "source": [ - "@file:Repository(\"*mavenLocal\")\n", - "@file:DependsOn(\"org.jetbrains.kotlinx:dataframe:0.9.0-dev\")" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "45583324", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Kotlin", - "language": "kotlin", - "name": "kotlin" - }, - "language_info": { - "codemirror_mode": "text/x-kotlin", - "file_extension": ".kt", - "mimetype": "text/x-kotlin", - "name": "kotlin", - "nbconvert_exporter": "", - "pygments_lexer": "kotlin", - "version": "1.7.20-dev-1299" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/convert.ipynb b/convert.ipynb deleted file mode 100644 index c48e514ae3..0000000000 --- a/convert.ipynb +++ /dev/null @@ -1,1059 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "02715c9a", - "metadata": {}, - "outputs": [], - "source": [ - "@file:Repository(\"*mavenLocal\")" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "0127fecf", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - " " - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " " - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "@file:DependsOn(\"org.jetbrains.kotlinx:dataframe:0.9.0-dev\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "24bd29dd", - "metadata": {}, - "outputs": [], - "source": [ - "import org.jetbrains.kotlinx.dataframe.plugin.*" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "9e0c2678", - "metadata": {}, - "outputs": [], - "source": [ - "val df = dataFrameOf(\"a\")(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "fd0c3d4a", - "metadata": {}, - "outputs": [], - "source": [ - "var id = 0" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "20927012", - "metadata": {}, - "outputs": [], - "source": [ - "fun DataFrame<*>.generateSchemaDeclaration(): String {\n", - " return generateSchemaDeclaration(\"Convert$id\").replace(\"Line_\\\\d*\\\\.\".toRegex(), \"\").also { id++ }\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "fb8efa44", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "@DataSchema\n", - "interface Schema {\n", - " val a: Int\n", - "}\n", - "\n", - "val ColumnsContainer.a: DataColumn get() = this[\"a\"] as DataColumn\n", - "val DataRow.a: Int get() = this[\"a\"] as Int" - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.generateSchemaDeclaration(\"Schema\")" - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "edc5fdfe", - "metadata": {}, - "outputs": [], - "source": [ - "enum class Direction { NORTH, SOUTH, WEST, EAST }" - ] - }, - { - "cell_type": "code", - "execution_count": 9, - "id": "a81d8ac8", - "metadata": {}, - "outputs": [], - "source": [ - "val df = dataFrameOf(\"direction\")(\"NORTH\", \"WEST\")" - ] - }, - { - "cell_type": "code", - "execution_count": 10, - "id": "91591190", - "metadata": {}, - "outputs": [], - "source": [ - "val df1 = df.convert(\"direction\").to()" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "c0bf8afb", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "NORTH" - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.direction[0]" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "0ef747f3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "@DataSchema\n", - "interface Convert0 {\n", - " val direction: String\n", - "}\n", - "\n", - "val ColumnsContainer.direction: DataColumn get() = this[\"direction\"] as DataColumn\n", - "val DataRow.direction: String get() = this[\"direction\"] as String" - ] - }, - "execution_count": 12, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.generateSchemaDeclaration()" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "a6c56f85", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "@DataSchema\n", - "interface Convert1 {\n", - " val direction: Direction\n", - "}\n", - "\n", - "val ColumnsContainer.direction: DataColumn get() = this[\"direction\"] as DataColumn\n", - "val DataRow.direction: Direction get() = this[\"direction\"] as Direction" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.generateSchemaDeclaration()" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "0fe540af", - "metadata": {}, - "outputs": [], - "source": [ - "fun DataFrame<*>.generateTestStub(id: Int): String {\n", - " val name = \"Convert$id\"\n", - " val schema = generateSchemaDeclaration(name)\n", - " \n", - " return \"\"\"\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " $schema\n", - " \n", - " fun convert$id(df: DataFrame<$name>) {\n", - " \n", - " }\n", - " \"\"\"\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "a9e281de", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema\n", - "interface Convert1 {\n", - " val direction: String\n", - "}\n", - "\n", - "val ColumnsContainer.direction: DataColumn get() = this[\"direction\"] as DataColumn\n", - "val DataRow.direction: String get() = this[\"direction\"] as String\n", - " \n", - " fun convert1(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 15, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.generateTestStub(1)" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "7c5d2cc2", - "metadata": {}, - "outputs": [], - "source": [ - "val df = dataFrameOf(\"name\", \"age\", \"city\", \"weight\")(\n", - " \"Alice\", 15, \"London\", 54,\n", - " \"Bob\", 45, \"Dubai\", 87,\n", - " \"Charlie\", 20, \"Moscow\", null,\n", - " \"Charlie\", 40, \"Milan\", null,\n", - " \"Bob\", 30, \"Tokyo\", 68,\n", - " \"Alice\", 20, null, 55,\n", - " \"Charlie\", 30, \"Moscow\", 90\n", - " )\n", - "val df2 = dataFrameOf(\"age\")(32.6, 56.3, null)\n", - "val merged = df.concat(df2)" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "c098e4f7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema\n", - "interface Convert3 {\n", - " val age: Number?\n", - " val city: String?\n", - " val name: String?\n", - " val weight: Int?\n", - "}\n", - "\n", - "val ColumnsContainer.age: DataColumn get() = this[\"age\"] as DataColumn\n", - "val DataRow.age: Number? get() = this[\"age\"] as Number?\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String? get() = this[\"city\"] as String?\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String? get() = this[\"name\"] as String?\n", - "val ColumnsContainer.weight: DataColumn get() = this[\"weight\"] as DataColumn\n", - "val DataRow.weight: Int? get() = this[\"weight\"] as Int?\n", - " \n", - " fun convert3(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "merged.generateTestStub(3)" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "9a4980d5", - "metadata": {}, - "outputs": [], - "source": [ - "val merged1 = merged.convert(\"age\") { \"age\"()?.toDouble() }" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "44353265", - "metadata": {}, - "outputs": [], - "source": [ - "fun col0(v: Double?) {}\n", - "col0(merged1.age[0])" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "4991c3db", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema\n", - "interface Convert4 {\n", - " val age: Number?\n", - " val city: String?\n", - " val name: String?\n", - " val weight: Int?\n", - "}\n", - "\n", - "val ColumnsContainer.age: DataColumn get() = this[\"age\"] as DataColumn\n", - "val DataRow.age: Number? get() = this[\"age\"] as Number?\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String? get() = this[\"city\"] as String?\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String? get() = this[\"name\"] as String?\n", - "val ColumnsContainer.weight: DataColumn get() = this[\"weight\"] as DataColumn\n", - "val DataRow.weight: Int? get() = this[\"weight\"] as Int?\n", - " \n", - " fun convert4(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "merged.generateTestStub(4)" - ] - }, - { - "cell_type": "code", - "execution_count": 21, - "id": "28e9c88d", - "metadata": {}, - "outputs": [], - "source": [ - "val df1 = merged.convert(\"age\", \"weight\") { it?.toString() }" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "34d6c304", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataColumn: name = \"weight\", type = String?, size = 10

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.weight" - ] - }, - { - "cell_type": "code", - "execution_count": 23, - "id": "89875ce3", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 10, columnsCount = 4

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 23, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.select { all().filter { it.path.size == 1 } }" - ] - }, - { - "cell_type": "code", - "execution_count": 24, - "id": "f130ce9d", - "metadata": {}, - "outputs": [], - "source": [ - "val df = merged.convert { age }.with { 42 }" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "105f3ac7", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema\n", - "interface Convert5 {\n", - " val age: Number?\n", - " val city: String?\n", - " val name: String?\n", - " val weight: Int?\n", - "}\n", - "\n", - "val ColumnsContainer.age: DataColumn get() = this[\"age\"] as DataColumn\n", - "val DataRow.age: Number? get() = this[\"age\"] as Number?\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String? get() = this[\"city\"] as String?\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String? get() = this[\"name\"] as String?\n", - "val ColumnsContainer.weight: DataColumn get() = this[\"weight\"] as DataColumn\n", - "val DataRow.weight: Int? get() = this[\"weight\"] as Int?\n", - " \n", - " fun convert5(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 25, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "merged.generateTestStub(5)" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "f221fa99", - "metadata": {}, - "outputs": [], - "source": [ - "val df = merged.group { cols(age, name, weight) }.into(\"person\")" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "3b2dd876", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema(isOpen = false)\n", - "interface Convert61 {\n", - " val age: Number?\n", - " val name: String?\n", - " val weight: Int?\n", - "}\n", - "\n", - "val ColumnsContainer.age: DataColumn get() = this[\"age\"] as DataColumn\n", - "val DataRow.age: Number? get() = this[\"age\"] as Number?\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String? get() = this[\"name\"] as String?\n", - "val ColumnsContainer.weight: DataColumn get() = this[\"weight\"] as DataColumn\n", - "val DataRow.weight: Int? get() = this[\"weight\"] as Int?\n", - "\n", - "@DataSchema\n", - "interface Convert6 {\n", - " val city: String?\n", - " val person: DataRow\n", - "}\n", - "\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String? get() = this[\"city\"] as String?\n", - "val ColumnsContainer.person: ColumnGroup get() = this[\"person\"] as ColumnGroup\n", - "val DataRow.person: DataRow get() = this[\"person\"] as DataRow\n", - " \n", - " fun convert6(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 27, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.generateTestStub(6)" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "17411f99", - "metadata": {}, - "outputs": [], - "source": [ - "val df1 = df.convert { person.age }.with { it ?: 42 }" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "b7efafd4", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataColumn: name = \"age\", type = Number, size = 10

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.person.age" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "2ed49ca5", - "metadata": {}, - "outputs": [], - "source": [ - "val DataRow.age get() = 42" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "0f084421", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 10, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 31, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.filter { it.age == 42 }" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "4e06d749", - "metadata": {}, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 10, columnsCount = 4

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "merged.convert { age }.to() // could be not String, but Convert.String (more typesafety)" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "e88e5600", - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - " import org.jetbrains.kotlinx.dataframe.*\n", - " import org.jetbrains.kotlinx.dataframe.api.*\n", - " import org.jetbrains.kotlinx.dataframe.annotations.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - " import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - " @DataSchema\n", - "interface Convert7 {\n", - " val age: Number?\n", - " val city: String?\n", - " val name: String?\n", - " val weight: Int?\n", - "}\n", - "\n", - "val ColumnsContainer.age: DataColumn get() = this[\"age\"] as DataColumn\n", - "val DataRow.age: Number? get() = this[\"age\"] as Number?\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String? get() = this[\"city\"] as String?\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String? get() = this[\"name\"] as String?\n", - "val ColumnsContainer.weight: DataColumn get() = this[\"weight\"] as DataColumn\n", - "val DataRow.weight: Int? get() = this[\"weight\"] as Int?\n", - " \n", - " fun convert7(df: DataFrame) {\n", - " \n", - " }\n", - " " - ] - }, - "execution_count": 34, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "merged.generateTestStub(7)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "11b615b6", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Kotlin", - "language": "kotlin", - "name": "kotlin" - }, - "language_info": { - "codemirror_mode": "text/x-kotlin", - "file_extension": ".kt", - "mimetype": "text/x-kotlin", - "name": "kotlin", - "nbconvert_exporter": "", - "pygments_lexer": "kotlin", - "version": "1.7.20-dev-1299" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} diff --git a/explode.ipynb b/explode.ipynb deleted file mode 100644 index df39ff6c1a..0000000000 --- a/explode.ipynb +++ /dev/null @@ -1,1660 +0,0 @@ -{ - "cells": [ - { - "cell_type": "code", - "execution_count": 1, - "id": "10580d5c", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "@file:Repository(\"*mavenLocal\")" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "3404e934", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": [ - "
\n", - " " - ] - }, - "metadata": {}, - "output_type": "display_data" - }, - { - "data": { - "text/html": [ - " " - ] - }, - "metadata": {}, - "output_type": "display_data" - } - ], - "source": [ - "@file:DependsOn(\"org.jetbrains.kotlinx:dataframe:0.9.0-dev\")" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "85075d1b", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "import org.jetbrains.kotlinx.dataframe.plugin.*\n", - "import org.jetbrains.kotlinx.dataframe.plugin.testing.schemaRender.toPluginDataFrameSchema" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "3ad39373", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "@DataSchema\n", - "interface Person {\n", - " val name: String\n", - " val age: Int\n", - " val city: String?\n", - " val weight: Int?\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "89cb1e21", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val df = dataFrameOf(\"name\", \"age\", \"city\", \"weight\")(\n", - " \"Alice\", 15, \"London\", 54,\n", - " \"Bob\", 45, \"Dubai\", 87,\n", - " \"Charlie\", 20, \"Moscow\", null,\n", - " \"Charlie\", 40, \"Milan\", null,\n", - " \"Bob\", 30, \"Tokyo\", 68,\n", - " \"Alice\", 20, null, 55,\n", - " \"Charlie\", 30, \"Moscow\", 90\n", - " )\n", - "\n", - "val typed: DataFrame = df.cast()" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "a4e6242d", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "private val defaultExplodeColumns: ColumnsSelector<*, *> = { dfs { it.isList() || it.isFrameColumn() } }\n", - "\n", - "fun DataFrame.explodeTest(\n", - " dropEmpty: Boolean = true,\n", - " selector: ColumnsSelector = defaultExplodeColumns\n", - "): DataFrame {\n", - " println(\"Before runtime\")\n", - " schema().print()\n", - " println(\"Before compile\")\n", - " pluginSchema().print()\n", - " val runtime = explode(dropEmpty, selector)\n", - " println()\n", - " println()\n", - " println(\"Runtime\")\n", - " runtime.schema().print()\n", - " println(\"Compile\")\n", - " val compile = pluginSchema().explodeImpl(dropEmpty, selector.toColumnPath(this))\n", - " compile.print()\n", - " return runtime\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 7, - "id": "cbf673de", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

GroupBy

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 7, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val grouped = typed.groupBy { city }\n", - "grouped" - ] - }, - { - "cell_type": "code", - "execution_count": 52, - "id": "d5e0c2a0", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "fun DataFrame<*>.generateTestStub(id: Int): String {\n", - " val name = \"Explode$id\"\n", - " val schema = generateSchemaDeclaration(name)\n", - " \n", - " return \"\"\"\n", - "import org.jetbrains.kotlinx.dataframe.*\n", - "import org.jetbrains.kotlinx.dataframe.api.*\n", - "import org.jetbrains.kotlinx.dataframe.annotations.*\n", - "import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - "import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - "$schema\n", - " \n", - "fun convert$id(df: DataFrame<$name>) {\n", - " \n", - "}\"\"\"\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 45, - "id": "5578298e", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "city: String\n", - "group: *\n", - " name: String\n", - " city: String\n" - ] - }, - "execution_count": 45, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val df = typed.filter { city != null }.remove { age and weight }.groupBy { city }.toDataFrame()\n", - "df.schema()" - ] - }, - { - "cell_type": "code", - "execution_count": 53, - "id": "52875c70", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "\n", - "import org.jetbrains.kotlinx.dataframe.*\n", - "import org.jetbrains.kotlinx.dataframe.api.*\n", - "import org.jetbrains.kotlinx.dataframe.annotations.*\n", - "import org.jetbrains.kotlinx.dataframe.plugin.testing.*\n", - "import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.*\n", - " \n", - "@DataSchema(isOpen = false)\n", - "interface Explode01 {\n", - " val city: String\n", - " val name: String\n", - "}\n", - "\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String get() = this[\"city\"] as String\n", - "val ColumnsContainer.name: DataColumn get() = this[\"name\"] as DataColumn\n", - "val DataRow.name: String get() = this[\"name\"] as String\n", - "\n", - "@DataSchema\n", - "interface Explode0 {\n", - " val city: String\n", - " val group: DataFrame\n", - "}\n", - "\n", - "val ColumnsContainer.city: DataColumn get() = this[\"city\"] as DataColumn\n", - "val DataRow.city: String get() = this[\"city\"] as String\n", - "val ColumnsContainer.group: DataColumn> get() = this[\"group\"] as DataColumn>\n", - "val DataRow.group: DataFrame get() = this[\"group\"] as DataFrame\n", - " \n", - "fun convert0(df: DataFrame) {\n", - " \n", - "}" - ] - }, - "execution_count": 53, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.generateTestStub(0)" - ] - }, - { - "cell_type": "code", - "execution_count": 11, - "id": "94efbcf1", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Before runtime\n", - "city: String\n", - "group: *\n", - " name: String\n", - " city: String\n", - "\n", - "Before compile\n", - "city: kotlin.String\n", - "*group\n", - " name: kotlin.String\n", - " city: kotlin.String\n", - "Runtime\n", - "city: String\n", - "group:\n", - " name: String\n", - " city: String\n", - "\n", - "Compile\n", - "city: kotlin.String\n", - "group\n", - " name: kotlin.String\n", - " city: kotlin.String\n" - ] - }, - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 6, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 11, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df.explodeTest() { group }" - ] - }, - { - "cell_type": "code", - "execution_count": 12, - "id": "2de8b5cf", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val groupCol = grouped.groups.toColumnAccessor()" - ] - }, - { - "cell_type": "code", - "execution_count": 13, - "id": "5bf661f0", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "org.jetbrains.kotlinx.dataframe.impl.columns.ColumnAccessorImpl@3f36b447" - ] - }, - "execution_count": 13, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "groupCol" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "f26a32d3", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 6, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 14, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val plain = grouped.toDataFrame()\n", - " .update { groupCol }.at(1).withNull() // shouldn't happen\n", - " .update { groupCol }.at(2).with { emptyDataFrame() }\n", - " .update { groupCol }.at(3).with { it.filter { false } }\n", - "plain" - ] - }, - { - "cell_type": "code", - "execution_count": 41, - "id": "03690a8c", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "city: String?\n", - "group: DataFrame?\n" - ] - }, - "execution_count": 41, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "plain.schema()" - ] - }, - { - "cell_type": "code", - "execution_count": 15, - "id": "ab29e832", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Before runtime\n", - "city: String?\n", - "group: DataFrame?\n", - "\n", - "Before compile\n", - "city: kotlin.String?\n", - "group: org.jetbrains.kotlinx.dataframe.DataFrame?\n", - "Runtime\n", - "city: String?\n", - "group:\n", - " name: String?\n", - " age: Int?\n", - " city: String?\n", - " weight: Int?\n", - "\n", - "Compile\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "An operation is not implemented: explode lists\n", - "kotlin.NotImplementedError: An operation is not implemented: explode lists\n", - "\tat org.jetbrains.kotlinx.dataframe.plugin.ExplodeKt.explodeImpl$explode(explode.kt:49)\n", - "\tat org.jetbrains.kotlinx.dataframe.plugin.ExplodeKt.explodeImpl(explode.kt:58)\n", - "\tat Line_11.explodeTest(Line_11.jupyter-kts:15)\n", - "\tat Line_24.(Line_24.jupyter-kts:1)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n", - "\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n", - "\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.evalWithConfigAndOtherScriptsResults(BasicJvmScriptEvaluator.kt:100)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke$suspendImpl(BasicJvmScriptEvaluator.kt:47)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke(BasicJvmScriptEvaluator.kt)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmReplEvaluator.eval(BasicJvmReplEvaluator.kt:49)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl$eval$resultWithDiagnostics$1.invokeSuspend(InternalEvaluatorImpl.kt:99)\n", - "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n", - "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\n", - "\tat kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)\n", - "\tat kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:99)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:70)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withHost(repl.kt:618)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)\n", - "\tat kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)\n" - ] - } - ], - "source": [ - "val res = plain.explodeTest(dropEmpty = false) { groupCol }\n", - "res" - ] - }, - { - "cell_type": "code", - "execution_count": 16, - "id": "610aa2d1", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Before runtime\n", - "city: String?\n", - "group: DataFrame?\n", - "\n", - "Before compile\n", - "city: kotlin.String?\n", - "group: org.jetbrains.kotlinx.dataframe.DataFrame?\n", - "Runtime\n", - "city: String?\n", - "group:\n", - " name: String?\n", - " age: Int?\n", - " city: String?\n", - " weight: Int?\n", - "\n", - "Compile\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "An operation is not implemented: explode lists\n", - "kotlin.NotImplementedError: An operation is not implemented: explode lists\n", - "\tat org.jetbrains.kotlinx.dataframe.plugin.ExplodeKt.explodeImpl$explode(explode.kt:49)\n", - "\tat org.jetbrains.kotlinx.dataframe.plugin.ExplodeKt.explodeImpl(explode.kt:58)\n", - "\tat Line_11.explodeTest(Line_11.jupyter-kts:15)\n", - "\tat Line_25.(Line_25.jupyter-kts:1)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n", - "\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n", - "\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.evalWithConfigAndOtherScriptsResults(BasicJvmScriptEvaluator.kt:100)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke$suspendImpl(BasicJvmScriptEvaluator.kt:47)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke(BasicJvmScriptEvaluator.kt)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmReplEvaluator.eval(BasicJvmReplEvaluator.kt:49)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl$eval$resultWithDiagnostics$1.invokeSuspend(InternalEvaluatorImpl.kt:99)\n", - "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n", - "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\n", - "\tat kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)\n", - "\tat kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:99)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:70)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withHost(repl.kt:618)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)\n", - "\tat kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)\n" - ] - } - ], - "source": [ - "val res1 = plain.explodeTest(dropEmpty = true) { groupCol }\n", - "res1" - ] - }, - { - "cell_type": "code", - "execution_count": 17, - "id": "0ebb11e7", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "6" - ] - }, - "execution_count": 17, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val expected = plain[groupCol.name()].sumOf { Math.max((it as AnyFrame?)?.rowsCount() ?: 0, 1) }\n", - "expected" - ] - }, - { - "cell_type": "code", - "execution_count": 18, - "id": "5aa72274", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val ints by columnOf(1, 2, 3)\n", - "val group by columnOf(ints)\n", - "val df = dataFrameOf(group)\n", - "\n", - "val frameCol by columnOf(df, df.take(0))\n", - "val names by columnOf(\"a\", \"b\")\n", - "val df1 = dataFrameOf(names, frameCol)" - ] - }, - { - "cell_type": "code", - "execution_count": 19, - "id": "9f4a5c6a", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "names: String\n", - "frameCol: *\n", - " group:\n", - " ints: Int\n" - ] - }, - "execution_count": 19, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.schema()" - ] - }, - { - "cell_type": "code", - "execution_count": 20, - "id": "3828ad96", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Before runtime\n", - "names: String\n", - "frameCol: *\n", - " group:\n", - " ints: Int\n", - "\n", - "Before compile\n", - "names: kotlin.String\n", - "*frameCol\n", - " group\n", - " ints: kotlin.Int\n", - "Runtime\n", - "names: String\n", - "frameCol:\n", - " group:\n", - " ints: Int\n", - "\n", - "Compile\n", - "names: kotlin.String\n", - "frameCol\n", - " group\n", - " ints: kotlin.Int\n" - ] - }, - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 3, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 20, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "df1.explodeTest()" - ] - }, - { - "cell_type": "code", - "execution_count": 22, - "id": "67b39d9c", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Before runtime\n", - "names: String\n", - "frameCol: *\n", - " group:\n", - " ints: Int\n", - "\n", - "Before compile\n", - "names: kotlin.String\n", - "*frameCol\n", - " group\n", - " ints: kotlin.Int\n", - "Runtime\n", - "names: String\n", - "frameCol:\n", - " group:\n", - " ints: Int?\n", - "\n", - "Compile\n", - "names: kotlin.String\n", - "frameCol\n", - " group\n", - " ints: kotlin.Int?\n" - ] - }, - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 4, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val withEmpty = df1.explodeTest(dropEmpty = false)\n", - "withEmpty" - ] - }, - { - "cell_type": "code", - "execution_count": 25, - "id": "944897b8", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val ints by columnOf(1, 2, 3)\n", - "val dd = dataFrameOf(ints)\n", - "val nestedFrameCol by columnOf(dd, dd, dd)\n", - "val group by columnOf(ints, nestedFrameCol)\n", - "val df = dataFrameOf(group)\n", - "\n", - "val frameCol by columnOf(df, df.take(0))\n", - "val names by columnOf(\"a\", \"b\")\n", - "val df1 = dataFrameOf(names, frameCol)" - ] - }, - { - "cell_type": "code", - "execution_count": 26, - "id": "a0be5bd5", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "names: String\n", - "frameCol: *\n", - " group:\n", - " ints: Int\n", - " nestedFrameCol: *\n", - " ints: Int\n", - "\n" - ] - }, - { - "name": "stderr", - "output_type": "stream", - "text": [ - "Can not add value 'null' to FrameColumn\n", - "java.lang.IllegalArgumentException: Can not add value 'null' to FrameColumn\n", - "\tat org.jetbrains.kotlinx.dataframe.impl.api.UpdateKt.updateWith(update.kt:66)\n", - "\tat org.jetbrains.kotlinx.dataframe.impl.api.UpdateKt.updateWith(update.kt:81)\n", - "\tat org.jetbrains.kotlinx.dataframe.api.AppendKt.appendNulls(append.kt:26)\n", - "\tat org.jetbrains.kotlinx.dataframe.impl.api.ExplodeKt.explodeImpl$splitIntoRows(explode.kt:68)\n", - "\tat org.jetbrains.kotlinx.dataframe.impl.api.ExplodeKt.explodeImpl(explode.kt:109)\n", - "\tat org.jetbrains.kotlinx.dataframe.api.ExplodeKt.explode(explode.kt:20)\n", - "\tat org.jetbrains.kotlinx.dataframe.api.ExplodeKt.explode$default(explode.kt:17)\n", - "\tat Line_79.(Line_79.jupyter-kts:2)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)\n", - "\tat java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)\n", - "\tat java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)\n", - "\tat java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.evalWithConfigAndOtherScriptsResults(BasicJvmScriptEvaluator.kt:100)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke$suspendImpl(BasicJvmScriptEvaluator.kt:47)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmScriptEvaluator.invoke(BasicJvmScriptEvaluator.kt)\n", - "\tat kotlin.script.experimental.jvm.BasicJvmReplEvaluator.eval(BasicJvmReplEvaluator.kt:49)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl$eval$resultWithDiagnostics$1.invokeSuspend(InternalEvaluatorImpl.kt:99)\n", - "\tat kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)\n", - "\tat kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)\n", - "\tat kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:279)\n", - "\tat kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)\n", - "\tat kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)\n", - "\tat kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.InternalEvaluatorImpl.eval(InternalEvaluatorImpl.kt:99)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:70)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl$execute$1$result$1.invoke(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withHost(repl.kt:618)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.impl.CellExecutorImpl.execute(CellExecutorImpl.kt:68)\n", - "\tat org.jetbrains.kotlinx.jupyter.repl.CellExecutor$DefaultImpls.execute$default(CellExecutor.kt:14)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:438)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl$evalEx$1.invoke(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.withEvalContext(repl.kt:391)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.evalEx(repl.kt:427)\n", - "\tat org.jetbrains.kotlinx.jupyter.ReplForJupyterImpl.eval(repl.kt:475)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:301)\n", - "\tat org.jetbrains.kotlinx.jupyter.messaging.ProtocolKt$shellMessagesHandler$res$1.invoke(protocol.kt:300)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:180)\n", - "\tat org.jetbrains.kotlinx.jupyter.JupyterConnection$runExecution$execThread$1.invoke(connection.kt:178)\n", - "\tat kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:30)\n" - ] - } - ], - "source": [ - "df1.schema().print()\n", - "df1.explode(false).also { it.schema().print() }" - ] - }, - { - "cell_type": "code", - "execution_count": 27, - "id": "5ef768d2", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val df2 = dataFrameOf(ints, nestedFrameCol, nestedFrameCol.named(\"hi\"))" - ] - }, - { - "cell_type": "code", - "execution_count": 28, - "id": "b89ac682", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "ints: kotlin.Int\n", - "*nestedFrameCol\n", - " ints: kotlin.Int\n", - "*hi\n", - " ints: kotlin.Int\n", - "ints: Int\n", - "nestedFrameCol: *\n", - " ints: Int\n", - "hi: *\n", - " ints: Int\n", - "\n" - ] - }, - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 9, columnsCount = 3

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 28, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "println(df2.schema().toPluginDataFrameSchema())\n", - "df2.schema().print()\n", - "df2.explode()" - ] - }, - { - "cell_type": "code", - "execution_count": 29, - "id": "046bfe0f", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 3, columnsCount = 3

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 29, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "val dataRows = dataFrameOf(\"a\", \"b\", \"c\")(1, 2, 3).duplicateRows(3)\n", - "dataRows" - ] - }, - { - "cell_type": "code", - "execution_count": 30, - "id": "41f4fe2f", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val dataRowsList = dataRows.rows().toList()" - ] - }, - { - "cell_type": "code", - "execution_count": 31, - "id": "431ef487", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val dfWithList = dataFrameOf(\"id\", \"list\")(1, dataRowsList, 2, dataRowsList)" - ] - }, - { - "cell_type": "code", - "execution_count": 32, - "id": "2e3b2039", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/html": [ - " \n", - " \n", - " \n", - " \n", - " \n", - "
\n", - "\n", - "

DataFrame: rowsCount = 6, columnsCount = 2

\n", - " \n", - " \n", - " " - ] - }, - "execution_count": 32, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dfWithList.explode()" - ] - }, - { - "cell_type": "code", - "execution_count": 33, - "id": "2b811895", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "id: Int\n", - "list: *\n", - " a: Int\n", - " b: Int\n", - " c: Int\n" - ] - }, - "execution_count": 33, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dfWithList.schema()" - ] - }, - { - "cell_type": "code", - "execution_count": 34, - "id": "56205508", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val id by columnOf(1, 2)\n", - "val list by columnOf(dataRowsList, dataRowsList)" - ] - }, - { - "cell_type": "code", - "execution_count": 35, - "id": "81bda1cb", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val dfWithList1 = dataFrameOf(id, list)" - ] - }, - { - "cell_type": "code", - "execution_count": 36, - "id": "2627c0a6", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "id: Int\n", - "list: *\n", - " a: Int\n", - " b: Int\n", - " c: Int\n" - ] - }, - "execution_count": 36, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dfWithList1.schema()" - ] - }, - { - "cell_type": "code", - "execution_count": 37, - "id": "b48e969a", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "@DataSchema\n", - "interface MySchema {\n", - " val columnGroup: Any\n", - "}" - ] - }, - { - "cell_type": "code", - "execution_count": 38, - "id": "dee2a9e6", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val col1 by columnOf(\"a\", \"b\")\n", - "val col2 by columnOf(1, 2)\n", - "val columnGroup by columnOf(col1, col2)\n", - "val dfff = dataFrameOf(columnGroup)" - ] - }, - { - "cell_type": "code", - "execution_count": 39, - "id": "8ae85ad0", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [ - "val col = dfff[\"columnGroup\"] as DataColumn" - ] - }, - { - "cell_type": "code", - "execution_count": 40, - "id": "a064f035", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [ - { - "data": { - "text/plain": [ - "class org.jetbrains.kotlinx.dataframe.impl.columns.ColumnGroupImpl" - ] - }, - "execution_count": 40, - "metadata": {}, - "output_type": "execute_result" - } - ], - "source": [ - "dfff[\"columnGroup\"]::class" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f21cb5ba", - "metadata": { - "pycharm": { - "name": "#%%\n" - } - }, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "Kotlin", - "language": "kotlin", - "name": "kotlin" - }, - "language_info": { - "codemirror_mode": "text/x-kotlin", - "file_extension": ".kt", - "mimetype": "text/x-kotlin", - "name": "kotlin", - "nbconvert_exporter": "", - "pygments_lexer": "kotlin", - "version": "1.7.20-dev-1299" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/add.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/add.fir.txt deleted file mode 100644 index 848783e8de..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/add.fir.txt +++ /dev/null @@ -1,235 +0,0 @@ -FILE: add.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Add0 : R|kotlin/Any| { - public abstract val a: R|kotlin/Int| - public get(): R|kotlin/Int| - - } - public final fun add0(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - #(id = String(add0_schema), call = #(R|/df|)) - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(add0), call = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/add|(String(), = add@fun R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|.(it: R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|): R|kotlin/Int| { - ^ Int(42) - } - )) - local final fun col0(v: R|kotlin/Int|): R|kotlin/Unit| { - } - - R|/col0|(R|/df1|.R|/a|.R|SubstitutionOverride|(Int(0))) - local final fun col1(v: R|kotlin/Int|): R|kotlin/Unit| { - } - - /col1>#(R|/df1|.#.R|kotlin/collections/get|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.a: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.a: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/add.kt b/plugins/kotlin-dataframe/testData/interpretation/add.kt deleted file mode 100644 index cba8220a2d..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/add.kt +++ /dev/null @@ -1,19 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Add0 { - val a: Int -} - -fun add0(df: DataFrame) { - test(id = "add0_schema", call = dataFrame(df)) - val df1 = test(id = "add0", call = df.add("") { 42 }) - fun col0(v: kotlin.Int) {} - col0(df1.a[0]) - fun col1(v: kotlin.Int) {} - col1(df1.untitled[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.fir.txt deleted file mode 100644 index bd74951ed7..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.fir.txt +++ /dev/null @@ -1,215 +0,0 @@ -FILE: KProperties.kt - internal abstract interface KProperties : R|kotlin/Any| { - public abstract val col1: R|kotlin/Int| - public get(): R|kotlin/Int| - - public abstract val col2: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - internal final fun varargKPropertyTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|>|>(id = String(varargKProperty_0), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/varargKProperty|(vararg(Q|KProperties|::R|/KProperties.col1|, Q|KProperties|::R|/KProperties.col2|))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.kt deleted file mode 100644 index 29bc031334..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/KProperties.kt +++ /dev/null @@ -1,14 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal interface KProperties { - val col1: Int - val col2: Int? -} - -internal fun varargKPropertyTest() { - test(id = "varargKProperty_0", call = varargKProperty(KProperties::col1, KProperties::col2)) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.fir.txt deleted file mode 100644 index 3b38d1d4fb..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.fir.txt +++ /dev/null @@ -1,214 +0,0 @@ -FILE: addExpression.kt - public final fun addExpressionTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|.(org/jetbrains/kotlinx/dataframe/api/AddDataRow) -> kotlin/Int|>(id = String(addExpression_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/addExpression|( = addExpression@fun R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|.(it: R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|): R|kotlin/Int| { - ^ Int(42) - } - )) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|.(org/jetbrains/kotlinx/dataframe/api/AddDataRow) -> kotlin/Any?|>(id = String(addExpression_2), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/addExpression|( = addExpression@fun R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|.(it: R|org/jetbrains/kotlinx/dataframe/api/AddDataRow|): R|kotlin/Any?| { - ^ Int(42) - } - )) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.kt deleted file mode 100644 index 15cc9430d5..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/addExpression.kt +++ /dev/null @@ -1,7 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -fun addExpressionTest() { - test(id = "addExpression_1", call = addExpression { 42 }) - test(id = "addExpression_2", call = addExpression { 42 }) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.fir.txt deleted file mode 100644 index 870f7958b8..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.fir.txt +++ /dev/null @@ -1,243 +0,0 @@ -FILE: columnsSelector.kt - internal abstract interface Schema0 : R|kotlin/Any| { - public abstract val intField: R|kotlin/Int| - public get(): R|kotlin/Int| - - public abstract val group: R|Group0| - public get(): R|Group0| - - } - internal abstract interface Group0 : R|kotlin/Any| { - public abstract val stringField: R|kotlin/String| - public get(): R|kotlin/String| - - } - internal final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.intField: R|org/jetbrains/kotlinx/dataframe/DataColumn| - internal get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| { - ^ R|kotlin/TODO|() - } - internal final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.group: R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - internal get(): R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| { - ^ R|kotlin/TODO|() - } - internal final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.stringField: R|org/jetbrains/kotlinx/dataframe/DataColumn| - internal get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| { - ^ R|kotlin/TODO|() - } - internal final fun columnsSelectorTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|, org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl) -> org/jetbrains/kotlinx/dataframe/columns/ColumnSet|>(id = String(columnsSelector_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector|( = columnsSelector@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet| { - ^ this@R|special/anonymous|.R|/intField| - } - )) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|, org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl) -> org/jetbrains/kotlinx/dataframe/columns/ColumnSet|>(id = String(columnsSelector_2), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector|( = columnsSelector@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet| { - ^ this@R|special/anonymous|.R|/group|.R|/stringField| - } - )) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|, org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl) -> org/jetbrains/kotlinx/dataframe/columns/ColumnSet & java/io/Serializable)>|>(id = String(columnsSelector_3), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/columnsSelector| & java/io/Serializable)|>( = columnsSelector@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet & java/io/Serializable)>| { - ^ (this@R|special/anonymous|, this@R|special/anonymous|.R|/intField|).R|SubstitutionOverride|>| & java/io/Serializable)|>(this@R|special/anonymous|.R|/group|.R|/stringField|) - } - )) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.kt deleted file mode 100644 index d03d9c43a6..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/columnsSelector.kt +++ /dev/null @@ -1,26 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* -import org.jetbrains.kotlinx.dataframe.columns.* - - -internal interface Schema0 { - val intField: Int - val group: Group0 -} - -internal interface Group0 { - val stringField: String -} - -internal val ColumnsContainer.intField: DataColumn get() = TODO() -internal val ColumnsContainer.group: ColumnGroup get() = TODO() -internal val ColumnsContainer.stringField: DataColumn get() = TODO() - -internal fun columnsSelectorTest() { - test(id = "columnsSelector_1", call = columnsSelector { intField }) - test(id = "columnsSelector_2", call = columnsSelector { group.stringField }) - test(id = "columnsSelector_3", call = columnsSelector { intField and group.stringField }) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.fir.txt deleted file mode 100644 index 0eabeacdee..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.fir.txt +++ /dev/null @@ -1,262 +0,0 @@ -FILE: dataFrame.kt - internal abstract interface Schema1 : R|kotlin/Any| { - public abstract val i: R|kotlin/Int| - public get(): R|kotlin/Int| - - } - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|(isOpen = Boolean(false)) public abstract interface Schema21 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - } - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Schema2 : R|kotlin/Any| { - public abstract val person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - - } - internal final fun injectionScope(): R|kotlin/Unit| { - lval df: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|org/jetbrains/kotlinx/dataframe/api/dataFrameOf|(vararg(String(i))).R|org/jetbrains/kotlinx/dataframe/api/DataFrameBuilder.invoke|(vararg(Int(1), Int(2), Int(3))).R|org/jetbrains/kotlinx/dataframe/api/cast|() - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(dataFrame_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame|(R|/df|)) - lval df1: R|org/jetbrains/kotlinx/dataframe/AnyFrame| = R|org/jetbrains/kotlinx/dataframe/api/dataFrameOf|(vararg(String(i))).R|org/jetbrains/kotlinx/dataframe/api/DataFrameBuilder.invoke|(vararg(Int(1), Int(2), Int(3))) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(dataFrame_2), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame|(R|/df1|)) - lval df2: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|kotlin/TODO|() - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(dataFrame_3), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/dataFrame|(R|/df2|)) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/96| - - } - local final class 97 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow<*>|.person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer<*>|.person: R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - public get(): R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/97| - - } - local final class 98 { - public constructor(): R|org/jetbrains/kotlinx/dataframe/98| - - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow<*>|.i: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer<*>|.i: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.person: R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - public get(): R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.kt deleted file mode 100644 index 849a8362f2..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/dataFrame.kt +++ /dev/null @@ -1,28 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal interface Schema1 { - val i: Int -} - -@DataSchema(isOpen = false) -interface Schema21 { - val age: Number? -} - -@DataSchema -interface Schema2 { - val person: DataRow -} - -internal fun injectionScope() { - val df = dataFrameOf("i")(1, 2, 3).cast() - test(id = "dataFrame_1", call = dataFrame(df)) - val df1: AnyFrame = dataFrameOf("i")(1, 2, 3) - test(id = "dataFrame_2", call = dataFrame(df1)) - val df2: DataFrame = TODO() - test(id = "dataFrame_3", call = dataFrame(df2)) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.fir.txt deleted file mode 100644 index 5eae8b481e..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.fir.txt +++ /dev/null @@ -1,207 +0,0 @@ -FILE: enum.kt - internal final fun enumTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|(id = String(enum_1), R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/enum|(Q|org/jetbrains/kotlinx/dataframe/api/Infer|.R|org/jetbrains/kotlinx/dataframe/api/Infer.Type|)) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.kt deleted file mode 100644 index c56d314cf1..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/enum.kt +++ /dev/null @@ -1,9 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun enumTest() { - test(id = "enum_1", enum(Infer.Type)) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.fir.txt deleted file mode 100644 index 93602fbef4..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.fir.txt +++ /dev/null @@ -1,211 +0,0 @@ -FILE: insertClause.kt - internal final fun insertClauseTest(): R|kotlin/Unit| { - lval df: R|org/jetbrains/kotlinx/dataframe/AnyFrame| = R|org/jetbrains/kotlinx/dataframe/api/dataFrameOf|(vararg(String(a))).R|org/jetbrains/kotlinx/dataframe/api/DataFrameBuilder.invoke|(vararg(Int(1))) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(insert_1), call = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/insert|(String(b), = insert@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|org/jetbrains/kotlinx/dataframe/DataRow|): R|kotlin/Int| { - ^ Int(42) - } - )) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.kt deleted file mode 100644 index 1a5b038cb4..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/insertClause.kt +++ /dev/null @@ -1,10 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun insertClauseTest() { - val df = dataFrameOf("a")(1) - test(id = "insert_1", call = df.insert("b") { 42 }) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.fir.txt deleted file mode 100644 index 8008ab62f3..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.fir.txt +++ /dev/null @@ -1,207 +0,0 @@ -FILE: interpretationError.kt - public final fun interpretationErrorTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|(id = String(interpretationError_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/interpretationError|()) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.kt deleted file mode 100644 index 6eaf599d77..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/interpretationError.kt +++ /dev/null @@ -1,6 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -fun interpretationErrorTest() { - test(id = "interpretationError_1", call = interpretationError()) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.fir.txt deleted file mode 100644 index 668a6101cb..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.fir.txt +++ /dev/null @@ -1,216 +0,0 @@ -FILE: kproperty.kt - internal abstract interface Schema : R|kotlin/Any| { - public abstract val i: R|kotlin/Int| - public get(): R|kotlin/Int| - - @R|org/jetbrains/kotlinx/dataframe/annotations/ColumnName|(name = String(name)) public abstract val wwff: R|kotlin/Int| - public get(): R|kotlin/Int| - - } - internal final fun kpropertyTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(kproperty_1), R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kproperty|(Q|Schema|::R|/Schema.i|)) - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test||>(id = String(kproperty_2), R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kproperty|(Q|Schema|::R|/Schema.wwff|)) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.kt deleted file mode 100644 index 05bcc9182d..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/kproperty.kt +++ /dev/null @@ -1,16 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal interface Schema { - val i: Int - @ColumnName("name") - val wwff: Int -} - -internal fun kpropertyTest() { - test(id = "kproperty_1", kproperty(Schema::i)) - test(id = "kproperty_2", kproperty(Schema::wwff)) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.fir.txt deleted file mode 100644 index 549e119db1..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.fir.txt +++ /dev/null @@ -1,207 +0,0 @@ -FILE: memberFunction.kt - internal final fun memberFunctionTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|(id = String(memberFunction_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/Context.Context|(Int(123)).R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/Context.id|()) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.kt deleted file mode 100644 index 51e9ead975..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/memberFunction.kt +++ /dev/null @@ -1,9 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun memberFunctionTest() { - test(id = "memberFunction_1", call = Context(123).id()) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.fir.txt deleted file mode 100644 index fde74eac2b..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.fir.txt +++ /dev/null @@ -1,210 +0,0 @@ -FILE: rowValueExpression.kt - internal final fun rowValueExpressionTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|.(kotlin/Any?) -> kotlin/Int|>(id = String(rowValueExpression_1), R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/rowValueExpression|( = rowValueExpression@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Any?|): R|kotlin/Int| { - ^ Int(42) - } - )) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.kt deleted file mode 100644 index dfd2c0716a..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/rowValueExpression.kt +++ /dev/null @@ -1,6 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun rowValueExpressionTest() { - test(id = "rowValueExpression_1", rowValueExpression { 42 }) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/string.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/string.fir.txt deleted file mode 100644 index 2d2a716bf9..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/string.fir.txt +++ /dev/null @@ -1,207 +0,0 @@ -FILE: string.kt - public final fun injectionScope(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|(id = String(string_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/kotlinPrimitive|(String(42))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/string.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/string.kt deleted file mode 100644 index ec30f68556..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/string.kt +++ /dev/null @@ -1,6 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -fun injectionScope() { - test(id = "string_1", call = kotlinPrimitive("42")) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/type.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/type.fir.txt deleted file mode 100644 index d0adbb9e4b..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/type.fir.txt +++ /dev/null @@ -1,210 +0,0 @@ -FILE: type.kt - internal final fun typeTest(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|.(org/jetbrains/kotlinx/dataframe/DataRow) -> kotlin/Int|>(id = String(type_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/type|( = type@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|org/jetbrains/kotlinx/dataframe/DataRow|): R|kotlin/Int| { - ^ Int(42) - } - )) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/type.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/type.kt deleted file mode 100644 index 508a15b6dd..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/type.kt +++ /dev/null @@ -1,6 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun typeTest() { - test(id = "type_1", call = type { 42 }) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.fir.txt deleted file mode 100644 index 0f0d80692d..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.fir.txt +++ /dev/null @@ -1,207 +0,0 @@ -FILE: typeParameter.kt - internal final fun testTypeParameter(): R|kotlin/Unit| { - R|org/jetbrains/kotlinx/dataframe/plugin/testing/test|(id = String(typeParameter_1), call = R|org/jetbrains/kotlinx/dataframe/plugin/testing/atoms/typeParameter|()) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - } diff --git a/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.kt b/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.kt deleted file mode 100644 index d0c32440b7..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/atoms/typeParameter.kt +++ /dev/null @@ -1,10 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -internal fun testTypeParameter() { - test(id = "typeParameter_1", call = typeParameter()) -} - diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.fir.txt deleted file mode 100644 index 404c24453f..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.fir.txt +++ /dev/null @@ -1,229 +0,0 @@ -FILE: Convert0.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert0 : R|kotlin/Any| { - public abstract val year: R|kotlin/Int| - public get(): R|kotlin/Int| - - } - public final fun convert0(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|(vararg(String(year))).R|SubstitutionOverride|>|().R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/String|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert0|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.year|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.year: R|kotlin/String| - public get(): R|kotlin/String| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.year: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.year: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.year: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.kt deleted file mode 100644 index 3e7f4b5b2d..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert0.kt +++ /dev/null @@ -1,16 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert0 { - val year: Int -} - -fun convert0(df: DataFrame) { - val df1 = df.convert("year").to().cast() - fun col0(v: kotlin.String) {} - col0(df1.year[0]) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.fir.txt deleted file mode 100644 index f261678666..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.fir.txt +++ /dev/null @@ -1,248 +0,0 @@ -FILE: Convert1.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert1 : R|kotlin/Any| { - public abstract val direction: R|kotlin/String| - public get(): R|kotlin/String| - - } - public final enum class Direction : R|kotlin/Enum| { - private constructor(): R|Direction| { - super|>() - } - - public final static enum entry NORTH: R|Direction| - public final static enum entry SOUTH: R|Direction| - public final static enum entry WEST: R|Direction| - public final static enum entry EAST: R|Direction| - public final static fun values(): R|kotlin/Array| { - } - - public final static fun valueOf(value: R|kotlin/String|): R|Direction| { - } - - public final static val entries: R|kotlin/enums/EnumEntries| - public get(): R|kotlin/enums/EnumEntries| - - } - public final fun convert1(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|(vararg(String(direction))).R|SubstitutionOverride|>|().R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|Direction|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert1|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.direction|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.direction: R|Direction| - public get(): R|Direction| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.direction: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.direction: R|kotlin/String| - public get(): R|kotlin/String| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.direction: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.kt deleted file mode 100644 index 7d1d3a81e6..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert1.kt +++ /dev/null @@ -1,19 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert1 { - val direction: String -} - -enum class Direction { NORTH, SOUTH, WEST, EAST } - -fun convert1(df: DataFrame) { - val df1 = df.convert("direction").to().cast() - - fun col0(v: Direction) {} - col0(df1.direction[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.fir.txt deleted file mode 100644 index 77b2f61777..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.fir.txt +++ /dev/null @@ -1,260 +0,0 @@ -FILE: Convert2.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert2 : R|kotlin/Any| { - public abstract val a: R|kotlin/Int| - public get(): R|kotlin/Int| - - public abstract val b: R|kotlin/Int| - public get(): R|kotlin/Int| - - public abstract val c: R|kotlin/Int| - public get(): R|kotlin/Int| - - } - public final fun convert2(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|(vararg(String(a), String(b), String(c))).R|org/jetbrains/kotlinx/dataframe/api/with|( = with@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Any?|): R|kotlin/String| { - ^ R|/it|.R|kotlin/toString|() - } - ).R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/String|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert2|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.a|.R|SubstitutionOverride|(Int(0))) - R|/col0|((this@R|/convert2|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.b|.R|SubstitutionOverride|(Int(0))) - R|/col0|((this@R|/convert2|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.c|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.a: R|kotlin/String| - public get(): R|kotlin/String| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.a: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.b: R|kotlin/String| - public get(): R|kotlin/String| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.b: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.c: R|kotlin/String| - public get(): R|kotlin/String| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.c: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.a: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.a: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.b: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.b: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.c: R|kotlin/Int| - public get(): R|kotlin/Int| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.c: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.kt deleted file mode 100644 index a7242091bd..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert2.kt +++ /dev/null @@ -1,21 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert2 { - val a: Int - val b: Int - val c: Int -} - -fun convert2(df: DataFrame) { - val df1 = df.convert("a", "b", "c").with { it.toString() }.cast() - - fun col0(v: String) {} - col0(df1.a[0]) - col0(df1.b[0]) - col0(df1.c[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.fir.txt deleted file mode 100644 index c06a77ea81..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.fir.txt +++ /dev/null @@ -1,271 +0,0 @@ -FILE: Convert3.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert3 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public abstract val city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - public final fun convert3(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|(String(age), = convert@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Any?|): R|kotlin/Double?| { - ^ (this@R|special/anonymous|, String(age)).R|SubstitutionOverride|()?.{ $subj$.R|kotlin/Number.toDouble|() } - } - ).R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/Double?|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert3|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.age|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Double?| - public get(): R|kotlin/Double?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.kt deleted file mode 100644 index b9c38d7ab0..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert3.kt +++ /dev/null @@ -1,19 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert3 { - val age: Number? - val city: String? - val name: String? - val weight: Int? -} - -fun convert3(df: DataFrame) { - val df1 = df.convert("age") { "age"()?.toDouble() }.cast() - fun col0(v: Double?) {} - col0(df1.age[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.fir.txt deleted file mode 100644 index 1134ab1cc2..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.fir.txt +++ /dev/null @@ -1,272 +0,0 @@ -FILE: Convert4.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert4 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public abstract val city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - public final fun convert4(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|(String(age), vararg(String(weight)), = convert@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Any?|): R|kotlin/String?| { - ^ R|/it|?.{ $subj$.R|kotlin/Any.toString|() } - } - ) - local final fun col0(v: R|kotlin/String?|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert4|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.age|.R|SubstitutionOverride|(Int(0))) - R|/col0|((this@R|/convert4|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.weight|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.kt deleted file mode 100644 index 42f4dc0c4d..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert4.kt +++ /dev/null @@ -1,20 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert4 { - val age: Number? - val city: String? - val name: String? - val weight: Int? -} - -fun convert4(df: DataFrame) { - val df1 = df.convert("age", "weight") { it?.toString() } - fun col0(v: String?) {} - col0(df1.age[0]) - col0(df1.weight[0]) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.fir.txt deleted file mode 100644 index 1bfcd7c486..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.fir.txt +++ /dev/null @@ -1,274 +0,0 @@ -FILE: Convert5.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert5 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public abstract val city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - public final fun convert5(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|( = convert@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet| { - ^ this@R|special/anonymous|.R|/age| - } - ).R|org/jetbrains/kotlinx/dataframe/api/with|( = with@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Number?|): R|kotlin/Int| { - ^ Int(42) - } - ).R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/Int|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert5|, R|/df|).R|org/jetbrains/kotlinx/dataframe/99.age|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Int| - public get(): R|kotlin/Int| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.kt deleted file mode 100644 index ce7aa5a892..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert5.kt +++ /dev/null @@ -1,19 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert5 { - val age: Number? - val city: String? - val name: String? - val weight: Int? -} - -fun convert5(df: DataFrame) { - val df1 = df.convert { age }.with { 42 }.cast() - fun col0(v: Int) {} - col0(df.age[0]) -} diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.fir.txt deleted file mode 100644 index a7ba5cb662..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.fir.txt +++ /dev/null @@ -1,291 +0,0 @@ -FILE: Convert6.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|(isOpen = Boolean(false)) public abstract interface Convert61 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public abstract val name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert6 : R|kotlin/Any| { - public abstract val city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - - } - public final fun convert6(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|( = convert@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet| { - ^ this@R|special/anonymous|.R|/person|.R|/age| - } - ).R|org/jetbrains/kotlinx/dataframe/api/with|( = with@fun R|org/jetbrains/kotlinx/dataframe/DataRow|.(it: R|kotlin/Number?|): R|kotlin/Number| { - ^ R|/it| ?: Int(42) - } - ).R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/Number|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert6|, (this@R|/convert6|, R|/df1|).R|org/jetbrains/kotlinx/dataframe/99.person|).R|org/jetbrains/kotlinx/dataframe/98.age|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number| - public get(): R|kotlin/Number| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/98| - - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.person: R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - public get(): R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.person: R|org/jetbrains/kotlinx/dataframe/DataRow| - public get(): R|org/jetbrains/kotlinx/dataframe/DataRow| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.person: R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| - public get(): R|org/jetbrains/kotlinx/dataframe/columns/ColumnGroup| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.kt deleted file mode 100644 index 15e9f62c4f..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert6.kt +++ /dev/null @@ -1,24 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema(isOpen = false) -interface Convert61 { - val age: Number? - val name: String? - val weight: Int? -} - -@DataSchema -interface Convert6 { - val city: String? - val person: DataRow -} - -fun convert6(df: DataFrame) { - val df1 = df.convert { person.age }.with { it ?: 42 }.cast() - fun col0(v: Number) {} - col0(df1.person.age[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.fir.txt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.fir.txt deleted file mode 100644 index 2edcf56b43..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.fir.txt +++ /dev/null @@ -1,271 +0,0 @@ -FILE: Convert7.kt - @R|org/jetbrains/kotlinx/dataframe/annotations/DataSchema|() public abstract interface Convert7 : R|kotlin/Any| { - public abstract val age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - - public abstract val city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public abstract val weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - } - public final fun convert7(df: R|org/jetbrains/kotlinx/dataframe/DataFrame|): R|kotlin/Unit| { - lval df1: R|org/jetbrains/kotlinx/dataframe/DataFrame| = R|/df|.R|org/jetbrains/kotlinx/dataframe/api/convert|( = convert@fun R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|.(it: R|org/jetbrains/kotlinx/dataframe/api/ColumnsSelectionDsl|): R|org/jetbrains/kotlinx/dataframe/columns/ColumnSet| { - ^ this@R|special/anonymous|.R|/age| - } - ).R|SubstitutionOverride|>|().R|org/jetbrains/kotlinx/dataframe/api/cast|() - local final fun col0(v: R|kotlin/String?|): R|kotlin/Unit| { - } - - R|/col0|((this@R|/convert7|, R|/df|).R|org/jetbrains/kotlinx/dataframe/99.age|.R|SubstitutionOverride|(Int(0))) - } -FILE: __GENERATED DECLARATIONS__.kt - package org.jetbrains.kotlinx.dataframe - - local final class 0 { - } - local final class 1 { - } - local final class 2 { - } - local final class 3 { - } - local final class 4 { - } - local final class 5 { - } - local final class 6 { - } - local final class 7 { - } - local final class 8 { - } - local final class 9 { - } - local final class 10 { - } - local final class 11 { - } - local final class 12 { - } - local final class 13 { - } - local final class 14 { - } - local final class 15 { - } - local final class 16 { - } - local final class 17 { - } - local final class 18 { - } - local final class 19 { - } - local final class 20 { - } - local final class 21 { - } - local final class 22 { - } - local final class 23 { - } - local final class 24 { - } - local final class 25 { - } - local final class 26 { - } - local final class 27 { - } - local final class 28 { - } - local final class 29 { - } - local final class 30 { - } - local final class 31 { - } - local final class 32 { - } - local final class 33 { - } - local final class 34 { - } - local final class 35 { - } - local final class 36 { - } - local final class 37 { - } - local final class 38 { - } - local final class 39 { - } - local final class 40 { - } - local final class 41 { - } - local final class 42 { - } - local final class 43 { - } - local final class 44 { - } - local final class 45 { - } - local final class 46 { - } - local final class 47 { - } - local final class 48 { - } - local final class 49 { - } - local final class 50 { - } - local final class 51 { - } - local final class 52 { - } - local final class 53 { - } - local final class 54 { - } - local final class 55 { - } - local final class 56 { - } - local final class 57 { - } - local final class 58 { - } - local final class 59 { - } - local final class 60 { - } - local final class 61 { - } - local final class 62 { - } - local final class 63 { - } - local final class 64 { - } - local final class 65 { - } - local final class 66 { - } - local final class 67 { - } - local final class 68 { - } - local final class 69 { - } - local final class 70 { - } - local final class 71 { - } - local final class 72 { - } - local final class 73 { - } - local final class 74 { - } - local final class 75 { - } - local final class 76 { - } - local final class 77 { - } - local final class 78 { - } - local final class 79 { - } - local final class 80 { - } - local final class 81 { - } - local final class 82 { - } - local final class 83 { - } - local final class 84 { - } - local final class 85 { - } - local final class 86 { - } - local final class 87 { - } - local final class 88 { - } - local final class 89 { - } - local final class 90 { - } - local final class 91 { - } - local final class 92 { - } - local final class 93 { - } - local final class 94 { - } - local final class 95 { - } - local final class 96 { - } - local final class 97 { - } - local final class 98 { - } - local final class 99 { - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - - public constructor(): R|org/jetbrains/kotlinx/dataframe/99| - - } -FILE: __GENERATED DECLARATIONS__.kt - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.age: R|kotlin/Number?| - public get(): R|kotlin/Number?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.age: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.city: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.city: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.name: R|kotlin/String?| - public get(): R|kotlin/String?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.name: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| - public final val R|org/jetbrains/kotlinx/dataframe/DataRow|.weight: R|kotlin/Int?| - public get(): R|kotlin/Int?| - public final val R|org/jetbrains/kotlinx/dataframe/ColumnsContainer|.weight: R|org/jetbrains/kotlinx/dataframe/DataColumn| - public get(): R|org/jetbrains/kotlinx/dataframe/DataColumn| diff --git a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.kt b/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.kt deleted file mode 100644 index efcd48c7b0..0000000000 --- a/plugins/kotlin-dataframe/testData/interpretation/convert/Convert7.kt +++ /dev/null @@ -1,19 +0,0 @@ -import org.jetbrains.kotlinx.dataframe.* -import org.jetbrains.kotlinx.dataframe.api.* -import org.jetbrains.kotlinx.dataframe.annotations.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.* -import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.* - -@DataSchema -interface Convert7 { - val age: Number? - val city: String? - val name: String? - val weight: Int? -} - -fun convert7(df: DataFrame) { - val df1 = df.convert { age }.to().cast() - fun col0(v: String?) {} - col0(df.age[0]) -} \ No newline at end of file diff --git a/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/AbstractDataFrameInterpretationTests.kt b/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/AbstractDataFrameInterpretationTests.kt deleted file mode 100644 index ea6cb4333d..0000000000 --- a/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/AbstractDataFrameInterpretationTests.kt +++ /dev/null @@ -1,169 +0,0 @@ -/* - * Copyright 2010-2022 JetBrains s.r.o. and Kotlin Programming Language contributors. - * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. - */ - -package org.jetbrains.kotlin.fir.dataframe - -//import io.kotest.assertions.withClue -//import io.kotest.matchers.shouldBe -import org.jetbrains.kotlin.compiler.plugin.CompilerPluginRegistrar -import org.jetbrains.kotlin.config.CompilerConfiguration -import org.jetbrains.kotlin.fir.FirSession -import org.jetbrains.kotlin.fir.dataframe.extensions.* -import org.jetbrains.kotlin.fir.dataframe.services.BaseTestRunner -import org.jetbrains.kotlin.fir.dataframe.services.DataFramePluginAnnotationsProvider -import org.jetbrains.kotlin.fir.expressions.FirLiteralExpression -import org.jetbrains.kotlin.fir.expressions.FirFunctionCall -import org.jetbrains.kotlin.fir.expressions.arguments -import org.jetbrains.kotlin.fir.expressions.unwrapArgument -import org.jetbrains.kotlin.fir.extensions.FirExpressionResolutionExtension -import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrar -import org.jetbrains.kotlin.fir.extensions.FirExtensionRegistrarAdapter -import org.jetbrains.kotlin.fir.types.ConeKotlinType -import org.jetbrains.kotlin.name.ClassId -import org.jetbrains.kotlin.test.builders.TestConfigurationBuilder -import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives -import org.jetbrains.kotlin.test.directives.FirDiagnosticsDirectives.FIR_DUMP -import org.jetbrains.kotlin.test.model.TestModule -import org.jetbrains.kotlin.test.runners.baseFirDiagnosticTestConfiguration -import org.jetbrains.kotlin.test.services.EnvironmentConfigurator -import org.jetbrains.kotlin.test.services.TestServices -import org.jetbrains.kotlinx.dataframe.KotlinTypeFacade - -//import org.jetbrains.kotlinx.dataframe.plugin.AddData.test0After -//import org.jetbrains.kotlinx.dataframe.plugin.AddData.test0Schema -//import org.jetbrains.kotlinx.dataframe.plugin.testing.atoms.Context - -abstract class AbstractDataFrameInterpretationTests : BaseTestRunner() { - lateinit var filePath: String - - override fun TestConfigurationBuilder.configuration() { - baseFirDiagnosticTestConfiguration() - defaultDirectives { - +FirDiagnosticsDirectives.ENABLE_PLUGIN_PHASES - +FIR_DUMP - } - - useConfigurators( - ::DataFramePluginAnnotationsProvider, - { testServices: TestServices -> Configurator(testServices, { filePath }) }, - ) - } - - override fun runTest(filePath: String) { - this.filePath = filePath - super.runTest(filePath) - } - - class Configurator(testServices: TestServices, val getTestFilePath: () -> String) : EnvironmentConfigurator(testServices) { - override fun CompilerPluginRegistrar.ExtensionStorage.registerCompilerExtensions( - module: TestModule, - configuration: CompilerConfiguration - ) { - FirExtensionRegistrarAdapter.registerExtension(object : FirExtensionRegistrar() { - override fun ExtensionRegistrarContext.configurePlugin() { - with(GeneratedNames()) { -// +{ it: FirSession -> ScopesGenerator(it, scopes, scopeState) } - +{ it: FirSession -> - InterpretersRunner(it, -// scopeState, -// tokenState, - getTestFilePath, - this::nextName, - this::nextScope) - } - +{ it: FirSession -> ExpressionAnalysisAdditionalChecker(it) } - } - } - }) - } - } - - class InterpretersRunner( - session: FirSession, -// val state: MutableMap, -// val tokenState: MutableMap, - val getTestFilePath: () -> String, - val nextName: (String) -> ClassId, - val nextScope: (String) -> ClassId - ) : FirExpressionResolutionExtension(session), KotlinTypeFacade { - override fun addNewImplicitReceivers(functionCall: FirFunctionCall): List { - functionCall.calleeReference.name.identifierOrNullIfSpecial?.let { - if (it == "test") { - val id = (functionCall.arguments[0].unwrapArgument() as FirLiteralExpression<*>).value as String - val call = functionCall.arguments[1].unwrapArgument() as FirFunctionCall - val interpreter = call.loadInterpreter()!! - - val result = interpret(call, interpreter, reporter = InterpretationErrorReporter.DEFAULT)?.value - ?: return emptyList() - -// withClue(id) { -// result shouldBe expectedResult(id) -// } - } - } - val file = getTestFilePath() - val associatedScopes = mutableMapOf>() - // used to actually inject api for some reason -// return generateAccessorsScopesForRefinedCall(functionCall, state, tokenState, associatedScopes, nextName = nextName, nextScope = nextScope) - return emptyList() - } - -// fun expectedResult(id: String): Any? { -// val map = mapOf( -// "string_1" to "42", -// "string_2" to "42", -// "dataFrame_1" to PluginDataFrameSchema(listOf(SimpleCol("i", TypeApproximationImpl("kotlin.Int", false)))), -// "dataFrame_2" to PluginDataFrameSchema(emptyList()), -// "dataFrame_3" to PluginDataFrameSchema( -// listOf( -// SimpleColumnGroup("person", listOf(SimpleCol("age", TypeApproximationImpl("kotlin.Number", true))), anyRow) -// ) -// ), -// "type_1" to TypeApproximationImpl("kotlin.Int", nullable = false), -// "insert_1" to InsertClauseApproximation( -// PluginDataFrameSchema(columns = emptyList()), -// SimpleCol("b", TypeApproximationImpl("kotlin.Int", false)) -// ), -// "enum_1" to Infer.Type, -// "kproperty_1" to KPropertyApproximation("i", TypeApproximationImpl("kotlin.Int", false)), -// "kproperty_2" to KPropertyApproximation("name", TypeApproximationImpl("kotlin.Int", false)), -// "addExpression_1" to TypeApproximationImpl("kotlin.Int", nullable = false), -// "addExpression_2" to TypeApproximationImpl("kotlin.Any", nullable = true), -//// "add0_schema" to test0Schema, -//// "add0" to test0After, -// "varargKProperty_0" to listOf( -// KPropertyApproximation("col1", TypeApproximationImpl("kotlin.Int", false)), -// KPropertyApproximation("col2", TypeApproximationImpl("kotlin.Int", true)) -// ), -//// "memberFunction_1" to Context(123), -// "typeParameter_1" to TypeApproximationImpl("kotlin.Int", false), -// "rowValueExpression_1" to TypeApproximationImpl("kotlin.Int", nullable = false), -// "columnsSelector_1" to listOf( -// ColumnWithPathApproximation( -// ColumnPathApproximation(listOf("intField")), -// SimpleCol(name = "intField", type = TypeApproximationImpl(fqName = "kotlin.Int", nullable = false)) -// ) -// ), -// "columnsSelector_2" to listOf( -// ColumnWithPathApproximation( -// ColumnPathApproximation(listOf("group", "stringField")), -// SimpleCol(name = "stringField", type = TypeApproximationImpl(fqName = "kotlin.String", nullable = false)) -// ) -// ), -// "columnsSelector_3" to listOf( -// ColumnWithPathApproximation( -// ColumnPathApproximation(listOf("intField")), -// SimpleCol(name = "intField", type = TypeApproximationImpl(fqName = "kotlin.Int", nullable = false)) -// ), -// ColumnWithPathApproximation( -// ColumnPathApproximation(listOf("group", "stringField")), -// SimpleCol(name = "stringField", type = TypeApproximationImpl(fqName = "kotlin.String", nullable = false)) -// ) -// ), -// ) -// return map[id] -// } - } -} diff --git a/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/GenerateTests.kt b/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/GenerateTests.kt index ec5b4ff3bc..37f3404775 100644 --- a/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/GenerateTests.kt +++ b/plugins/kotlin-dataframe/tests/org/jetbrains/kotlin/fir/dataframe/GenerateTests.kt @@ -25,9 +25,6 @@ fun main() { testClass { model("transform") } -// testClass { -// model("interpretation") -// } // // testClass { // model("research") diff --git a/settings.gradle.kts b/settings.gradle.kts index 648322ba5d..edfb56cc6f 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -10,7 +10,6 @@ include("plugins:kotlin-dataframe") include("tests") include("dataframe-arrow") include("dataframe-openapi") -//include("bridge-generator") include("examples:idea-examples:titanic") include("examples:idea-examples:movies")