@@ -64,7 +64,6 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
6464 .option(StateSourceOptions .INTERNAL_ONLY_READ_ALL_COLUMN_FAMILIES , " true" )
6565 .option(StateSourceOptions .STORE_NAME , storeName.orNull)
6666 .load()
67- .selectExpr(" partition_key" , " key_bytes" , " value_bytes" , " column_family_name" )
6867 }
6968
7069 /**
@@ -221,9 +220,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
221220 ))
222221
223222 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
224- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
223+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
225224
226- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
225+ validateBytesReadDfSchema(bytesDf)
226+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
227227 }
228228 }
229229 }
@@ -248,9 +248,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
248248 ))
249249
250250 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
251- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
251+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
252252
253- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
253+ validateBytesReadDfSchema(bytesDf)
254+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
254255 }
255256 }
256257 }
@@ -272,9 +273,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
272273 ))
273274
274275 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
275- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
276+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
276277
277- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
278+ validateBytesReadDfSchema(bytesDf)
279+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
278280 }
279281 }
280282 }
@@ -292,9 +294,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
292294 ))
293295
294296 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
295- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
297+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
296298
297- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
299+ validateBytesReadDfSchema(bytesDf)
300+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
298301 }
299302 }
300303
@@ -310,9 +313,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
310313 ))
311314
312315 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
313- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
316+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
314317
315- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
318+ validateBytesReadDfSchema(bytesDf)
319+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
316320 }
317321 }
318322
@@ -328,9 +332,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
328332 ))
329333
330334 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
331- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
335+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
332336
333- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
337+ validateBytesReadDfSchema(bytesDf)
338+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
334339 }
335340 }
336341
@@ -353,9 +358,10 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
353358 ))
354359
355360 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
356- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
361+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
357362
358- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
363+ validateBytesReadDfSchema(bytesDf)
364+ compareNormalAndBytesData(normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
359365 }
360366 }
361367
@@ -378,9 +384,11 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
378384 ))
379385
380386 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
381- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
387+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
382388
383- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
389+ validateBytesReadDfSchema(bytesDf)
390+ compareNormalAndBytesData(
391+ normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
384392 }
385393 }
386394 }
@@ -403,8 +411,11 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
403411 ))
404412
405413 val normalData = getNormalReadDf(tempDir.getAbsolutePath).collect()
406- val bytesDf = getBytesReadDf(tempDir.getAbsolutePath).collect()
407- compareNormalAndBytesData(normalData, bytesDf, " default" , keySchema, valueSchema)
414+ val bytesDf = getBytesReadDf(tempDir.getAbsolutePath)
415+
416+ validateBytesReadDfSchema(bytesDf)
417+ compareNormalAndBytesData(
418+ normalData, bytesDf.collect(), " default" , keySchema, valueSchema)
408419 }
409420 }
410421 }
@@ -427,6 +438,7 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
427438 StructField (" value" , LongType )
428439 ))
429440
441+ validateBytesReadDfSchema(stateBytesDfForRight)
430442 compareNormalAndBytesData(
431443 stateReaderForRight.collect(),
432444 stateBytesDfForRight.collect(),
@@ -458,6 +470,7 @@ class StatePartitionAllColumnFamiliesReaderSuite extends StateDataSourceTestBase
458470 ))
459471 }
460472
473+ validateBytesReadDfSchema(stateBytesDfForRight)
461474 compareNormalAndBytesData(
462475 stateReaderForRight.collect(),
463476 stateBytesDfForRight.collect(),
0 commit comments