Skip to content

Commit 9f4b473

Browse files
committed
setting nullable to true
1 parent 6286632 commit 9f4b473

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

sql/core/src/test/scala/org/apache/spark/sql/streaming/TransformWithStateSuite.scala

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,6 @@ abstract class TransformWithStateTest extends StateStoreMetricsTest
13561356
TransformWithStateSuiteUtils.NUM_SHUFFLE_PARTITIONS.toString) {
13571357
withTempDir { checkpointDir =>
13581358
// When Avro is used, we want to set the StructFields to nullable
1359-
val shouldBeNullable = usingAvroEncoding()
13601359
val metadataPathPostfix = "state/0/_stateSchema/default"
13611360
val stateSchemaPath = new Path(checkpointDir.toString,
13621361
s"$metadataPathPostfix")
@@ -1367,15 +1366,15 @@ abstract class TransformWithStateTest extends StateStoreMetricsTest
13671366
val schema0 = StateStoreColFamilySchema(
13681367
"countState", 0,
13691368
keySchema, 0,
1370-
new StructType().add("value", LongType, nullable = shouldBeNullable),
1369+
new StructType().add("value", LongType, nullable = true),
13711370
Some(NoPrefixKeyStateEncoderSpec(keySchema)),
13721371
None
13731372
)
13741373
val schema1 = StateStoreColFamilySchema(
13751374
"listState", 0,
13761375
keySchema, 0,
13771376
new StructType()
1378-
.add("id", LongType, nullable = shouldBeNullable)
1377+
.add("id", LongType, nullable = true)
13791378
.add("name", StringType),
13801379
Some(NoPrefixKeyStateEncoderSpec(keySchema)),
13811380
None
@@ -1398,7 +1397,7 @@ abstract class TransformWithStateTest extends StateStoreMetricsTest
13981397
val schema3 = StateStoreColFamilySchema(
13991398
"$rowCounter_listState", 0,
14001399
keySchema, 0,
1401-
new StructType().add("count", LongType, nullable = shouldBeNullable),
1400+
new StructType().add("count", LongType, nullable = true),
14021401
Some(NoPrefixKeyStateEncoderSpec(keySchema)),
14031402
None
14041403
)

0 commit comments

Comments
 (0)