Skip to content

Commit 2b9d951

Browse files
committed
added test for Issue #1222
1 parent 521840e commit 2b9d951

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

dataframe-jupyter/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/CodeGenerationTests.kt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,24 @@ class CodeGenerationTests : DataFrameJupyterTest() {
7070
df1.leaf.c
7171
""".checkCompilation()
7272
}
73+
74+
// Issue #1222
75+
@Test
76+
fun `do not reuse marker with non-matching sub-schema`() {
77+
@Language("kt")
78+
val _1 = """
79+
val df1 = dataFrameOf("group" to columnOf("a" to columnOf(1, null, 3)))
80+
val df2 = dataFrameOf("group" to columnOf("a" to columnOf(1, 2, 3)))
81+
df1.group.a
82+
df2.group.a
83+
""".checkCompilation()
84+
85+
@Language("kt")
86+
val _2 = """
87+
val df1 = dataFrameOf("group" to columnOf("a" to columnOf(1, 2, 3)))
88+
val df2 = dataFrameOf("group" to columnOf("a" to columnOf(1, null, 3)))
89+
df1.group.a
90+
df2.group.a
91+
""".checkCompilation()
92+
}
7393
}

0 commit comments

Comments
 (0)