@@ -221,9 +221,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
221221 ))
222222
223223 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
224- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
224+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
225225
226- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
226+ validateBytesReadDfSchema(bytesDf)
227+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
227228 }
228229 }
229230 }
@@ -248,9 +249,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
248249 ))
249250
250251 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
251- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
252+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
252253
253- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
254+ validateBytesReadDfSchema(bytesDf)
255+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
254256 }
255257 }
256258 }
@@ -272,9 +274,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
272274 ))
273275
274276 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
275- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
277+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
276278
277- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
279+ validateBytesReadDfSchema(bytesDf)
280+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
278281 }
279282 }
280283 }
@@ -292,9 +295,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
292295 ))
293296
294297 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
295- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
298+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
296299
297- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
300+ validateBytesReadDfSchema(bytesDf)
301+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
298302 }
299303 }
300304
@@ -310,9 +314,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
310314 ))
311315
312316 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
313- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
317+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
314318
315- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
319+ validateBytesReadDfSchema(bytesDf)
320+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
316321 }
317322 }
318323
@@ -328,9 +333,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
328333 ))
329334
330335 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
331- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
336+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
332337
333- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
338+ validateBytesReadDfSchema(bytesDf)
339+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
334340 }
335341 }
336342
@@ -353,9 +359,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
353359 ))
354360
355361 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
356- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
362+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
357363
358- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
364+ validateBytesReadDfSchema(bytesDf)
365+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
359366 }
360367 }
361368
@@ -378,9 +385,11 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
378385 ))
379386
380387 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
381- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
388+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
382389
383- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
390+ validateBytesReadDfSchema(bytesDf)
391+ compareNormalAndBytesData(
392+ normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
384393 }
385394 }
386395 }
@@ -403,8 +412,11 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
403412 ))
404413
405414 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
406- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
407- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
415+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
416+
417+ validateBytesReadDfSchema(bytesDf)
418+ compareNormalAndBytesData(
419+ normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
408420 }
409421 }
410422 }
@@ -427,6 +439,7 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
427439 StructField (" value" , LongType )
428440 ))
429441
442+ validateBytesReadDfSchema(stateBytesDfForRight)
430443 compareNormalAndBytesData(
431444 stateReaderForRight.collect(),
432445 stateBytesDfForRight.collect(),
@@ -458,6 +471,7 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
458471 ))
459472 }
460473
474+ validateBytesReadDfSchema(stateBytesDfForRight)
461475 compareNormalAndBytesData(
462476 stateReaderForRight.collect(),
463477 stateBytesDfForRight.collect(),
0 commit comments