wombatu-kun commented on code in PR #19564:
URL: https://github.com/apache/hudi/pull/19564#discussion_r4214111533
##########
hudi-common/src/test/java/org/apache/hudi/common/model/debezium/TestPostgresDebeziumAvroPayload.java:
##########
@@ -193,11 +208,14 @@ public void testMergeWithToastedValues() throws
IOException {
newVal.put("byte_null_col_2", ByteBuffer.wrap(getUTF8Bytes("valid byte
value")));
PostgresDebeziumAvroPayload payload = new
PostgresDebeziumAvroPayload(Option.of(newVal));
+ IndexedRecord currentValue = lazyCurrentRecord ?
SerializableIndexedRecord.createInstance(oldVal) : oldVal;
GenericRecord outputRecord = (GenericRecord) payload
- .combineAndGetUpdateValue(oldVal, avroSchema).get();
+ .combineAndGetUpdateValue(currentValue, avroSchema).get();
- assertEquals("valid string value", outputRecord.get("string_col"));
+ // Pin that the parameterization really exercises the lazily deserialized
implementation.
+ assertEquals(lazyIncomingRecord, outputRecord instanceof
SerializableIndexedRecord);
Review Comment:
After rebasing onto master this assertion fails for both
`lazyIncomingRecord=true` cases, because `mergeToastedValuesIfPresent` now
backfills onto a fresh `GenericData.Record` copy. Asserting on the record the
TOAST checks actually read still pins the lazy path:
`assertEquals(lazyIncomingRecord, payload.getInsertValue(avroSchema).get()
instanceof SerializableIndexedRecord);`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]