File tree Expand file tree Collapse file tree 5 files changed +63
-0
lines changed
generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe
src/test/kotlin/org/jetbrains/kotlinx/dataframe Expand file tree Collapse file tree 5 files changed +63
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,18 @@ class ColumnsSelectionDslTests : TestBase() {
63
63
it.any { it == " Alice" }
64
64
}
65
65
}
66
+
67
+ df.select {
68
+ " name" .last {
69
+ it.any { it == " Alice" }
70
+ }
71
+ } shouldBe df.select { name.firstName }
72
+
73
+ df.select {
74
+ Person ::name.last {
75
+ it.any { it == " Alice" }
76
+ }
77
+ } shouldBe df.select { name.firstName }
66
78
}
67
79
68
80
@Test
@@ -85,6 +97,18 @@ class ColumnsSelectionDslTests : TestBase() {
85
97
it.any { it == " Alice" }
86
98
}
87
99
}
100
+
101
+ df.select {
102
+ " name" .single {
103
+ it.any { it == " Alice" }
104
+ }
105
+ } shouldBe df.select { name.firstName }
106
+
107
+ df.select {
108
+ Person ::name.single {
109
+ it.any { it == " Alice" }
110
+ }
111
+ } shouldBe df.select { name.firstName }
88
112
}
89
113
90
114
}
Original file line number Diff line number Diff line change @@ -820,6 +820,11 @@ class Access : TestBase() {
820
820
group(" name" ).last { it.name().endsWith(" Name" ) }
821
821
}
822
822
823
+ // find the single column inside a column group satisfying the condition
824
+ df.select {
825
+ Person ::name.single { it.name().startsWith(" first" ) }
826
+ }
827
+
823
828
// depth-first-search traversal of all columns, excluding ColumnGroups from result
824
829
df.select { allDfs() }
825
830
Original file line number Diff line number Diff line change @@ -63,6 +63,18 @@ class ColumnsSelectionDslTests : TestBase() {
63
63
it.any { it == " Alice" }
64
64
}
65
65
}
66
+
67
+ df.select {
68
+ " name" .last {
69
+ it.any { it == " Alice" }
70
+ }
71
+ } shouldBe df.select { name.firstName }
72
+
73
+ df.select {
74
+ Person ::name.last {
75
+ it.any { it == " Alice" }
76
+ }
77
+ } shouldBe df.select { name.firstName }
66
78
}
67
79
68
80
@Test
@@ -85,6 +97,18 @@ class ColumnsSelectionDslTests : TestBase() {
85
97
it.any { it == " Alice" }
86
98
}
87
99
}
100
+
101
+ df.select {
102
+ " name" .single {
103
+ it.any { it == " Alice" }
104
+ }
105
+ } shouldBe df.select { name.firstName }
106
+
107
+ df.select {
108
+ Person ::name.single {
109
+ it.any { it == " Alice" }
110
+ }
111
+ } shouldBe df.select { name.firstName }
88
112
}
89
113
90
114
}
Original file line number Diff line number Diff line change @@ -820,6 +820,11 @@ class Access : TestBase() {
820
820
group(" name" ).last { it.name().endsWith(" Name" ) }
821
821
}
822
822
823
+ // find the single column inside a column group satisfying the condition
824
+ df.select {
825
+ Person ::name.single { it.name().startsWith(" first" ) }
826
+ }
827
+
823
828
// depth-first-search traversal of all columns, excluding ColumnGroups from result
824
829
df.select { allDfs() }
825
830
Original file line number Diff line number Diff line change @@ -214,6 +214,11 @@ df.select {
214
214
group(" name" ).last { it.name().endsWith(" Name" ) }
215
215
}
216
216
217
+ // find the single column inside a column group satisfying the condition
218
+ df.select {
219
+ Person ::name.single { it.name().startsWith(" first" ) }
220
+ }
221
+
217
222
// depth-first-search traversal of all columns, excluding ColumnGroups from result
218
223
df.select { allDfs() }
219
224
You can’t perform that action at this time.
0 commit comments