wwj6591812 commented on code in PR #8219:
URL: https://github.com/apache/paimon/pull/8219#discussion_r3463983092
##########
paimon-flink/paimon-flink-common/src/test/java/org/apache/paimon/flink/FlinkRowWrapperTest.java:
##########
@@ -59,6 +83,36 @@ public void
testExistingBlobDescriptorIsReadableWhenCheckingEnabled() throws Exc
assertThat(wrapper.getBlob(0).toData()).isEqualTo(bytes);
}
+ @Test
+ public void testMissingHttpBlobDescriptorIsNullWhenCheckingEnabled()
throws Exception {
Review Comment:
Thanks for pointing this out. You're right — with
blob-write-null-on-missing-file=true, FlinkRowWrapper.isNullAt() was calling
row.getBinary(pos) on every non-null field, so a row like (id INT, b BLOB)
could fail on getBinary(0) before reaching the blob column.
I've fixed this by tracking known BLOB field indexes (derived from the row
schema in FlinkSinkBuilder.mapToInternalRow()) and only running the descriptor
existence check on those positions. I also added
testMissingHttpBlobDescriptorWithNonBlobColumnBefore as a regression test with
a non-BLOB column before the descriptor column. Please take another look when
you have a chance.
--
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]