the-other-tim-brown commented on code in PR #13844:
URL: https://github.com/apache/hudi/pull/13844#discussion_r2327986809


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/streamer/HoodieStreamerUtils.java:
##########
@@ -113,6 +115,12 @@ public static Option<JavaRDD<HoodieRecord>> 
createHoodieRecords(HoodieStreamer.C
               BuiltinKeyGenerator builtinKeyGenerator = (BuiltinKeyGenerator) 
HoodieSparkKeyGeneratorFactory.createKeyGenerator(props);
               return new 
CloseableMappingIterator<>(ClosableIterator.wrap(genericRecordIterator), genRec 
-> {
                 try {
+                  if (shouldErrorTable) {
+                    Schema schema = genRec.getSchema();
+                    if (!GenericData.get().validate(schema, genRec)) {
+                      throw new HoodieException("The record does not match the 
schema: " + schema);

Review Comment:
   I think previously we were throwing IOExceptions when trying to serialize. 
Do we want to throw that exception or something more specific here?



-- 
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]

Reply via email to