Skip to content

Commit

Permalink
test: fix expect serialization size after adding isDualWrite for Ho…
Browse files Browse the repository at this point in the history
…odieRecord

1. fix expect serialization size after adding `isDualWrite` for HoodieRecord

Signed-off-by: TheR1sing3un <[email protected]>
  • Loading branch information
TheR1sing3un committed Nov 21, 2024
1 parent 22edf3f commit c374f4d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class TestHoodieRecordSerialization extends SparkClientFunctionalTestHarness {
val hoodieInternalRow = new HoodieInternalRow(new Array[UTF8String](5), unsafeRow, false)

Seq(
(unsafeRow, rowSchema, 89),
(hoodieInternalRow, addMetaFields(rowSchema), 129)
(unsafeRow, rowSchema, 91),
(hoodieInternalRow, addMetaFields(rowSchema), 131)
) foreach { case (row, schema, expectedSize) => routine(row, schema, expectedSize) }
}

Expand Down Expand Up @@ -110,11 +110,11 @@ class TestHoodieRecordSerialization extends SparkClientFunctionalTestHarness {
val avroIndexedRecord = new HoodieAvroIndexedRecord(key, avroRecord)
avroIndexedRecord.setIgnoreIndexUpdate(true)

val expectedLagacyRecordSize = if (HoodieSparkUtils.gteqSpark3_4) 536 else 530
val expectedLagacyRecordSize = if (HoodieSparkUtils.gteqSpark3_4) 538 else 532

Seq(
(legacyRecord, expectedLagacyRecordSize),
(avroIndexedRecord, 391)
(avroIndexedRecord, 393)
) foreach { case (record, expectedSize) => routine(record, expectedSize) }
}

Expand All @@ -133,7 +133,7 @@ class TestHoodieRecordSerialization extends SparkClientFunctionalTestHarness {
}

val key = new HoodieKey("rec-key", "part-path")
val expectedEmptyRecordSize = if (HoodieSparkUtils.gteqSpark3_4) 32 else 29
val expectedEmptyRecordSize = if (HoodieSparkUtils.gteqSpark3_4) 34 else 31
Seq(
(new HoodieEmptyRecord[GenericRecord](key, HoodieOperation.INSERT, 1, HoodieRecordType.AVRO),
expectedEmptyRecordSize),
Expand Down

0 comments on commit c374f4d

Please sign in to comment.