File tree Expand file tree Collapse file tree 2 files changed +43
-0
lines changed
dataframe-arrow/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io Expand file tree Collapse file tree 2 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -266,4 +266,11 @@ internal class ArrowKtTest {
266
266
Locale .setDefault(currentLocale)
267
267
}
268
268
}
269
+
270
+ @Test
271
+ fun testBigStringColumn () {
272
+ val dataFrame = dataFrameOf(bigStringColumn)
273
+ val data = dataFrame.saveArrowFeatherToByteArray()
274
+ DataFrame .readArrowFeather(data) shouldBe dataFrame
275
+ }
269
276
}
Original file line number Diff line number Diff line change @@ -154,3 +154,39 @@ val citiesExampleSchema = """{
154
154
} ]
155
155
}
156
156
""" .trimIndent()
157
+
158
+ /* *
159
+ * String column (variable length vector) with size >1 MiB
160
+ */
161
+ val bigStringColumn = run {
162
+ val list = ArrayList <String >()
163
+ for (i in 0 until 1024 ) {
164
+ val row = StringBuilder ()
165
+ for (j in 0 until 64 ) {
166
+ row.append(" abcd" )
167
+ }
168
+ list.add(row.toString())
169
+ }
170
+ for (i in 0 until 1024 ) {
171
+ val row = StringBuilder ()
172
+ for (j in 0 until 64 ) {
173
+ row.append(" гдёж" )
174
+ }
175
+ list.add(row.toString())
176
+ }
177
+ for (i in 0 until 1024 ) {
178
+ val row = StringBuilder ()
179
+ for (j in 0 until 64 ) {
180
+ row.append(" αβγδ" )
181
+ }
182
+ list.add(row.toString())
183
+ }
184
+ for (i in 0 until 1024 ) {
185
+ val row = StringBuilder ()
186
+ for (j in 0 until 64 ) {
187
+ row.append(" 正体字" )
188
+ }
189
+ list.add(row.toString())
190
+ }
191
+ DataColumn .createValueColumn(" bigStringColumn" , list)
192
+ }
You can’t perform that action at this time.
0 commit comments