hudi-agent commented on code in PR #20336:
URL: https://github.com/apache/hudi/pull/20336#discussion_r4291663537


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/transform/ErrorTableAwareChainedTransformer.java:
##########
@@ -51,16 +57,39 @@ public ErrorTableAwareChainedTransformer(List<Transformer> 
transformers) {
   public Dataset<Row> apply(JavaSparkContext jsc, SparkSession sparkSession, 
Dataset<Row> rowDataset,
                             TypedProperties properties) {
     Dataset<Row> dataset = rowDataset;
+    // Until the source supplies the column or a transformer keeps it, it is 
known to be all null.

Review Comment:
   🤖 nit: could you rename `corruptRecordMayHaveValues` / 
`keptCorruptRecordColumn` (or extract the loop body into a helper)? The loop 
mixes two flags and a nested if, which is hard to follow at a glance.
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/functional/TestErrorTableAwareChainedTransformer.java:
##########
@@ -89,6 +90,72 @@ public void testForErrorRecordColumn() {
     assertThrows(HoodieValidationException.class, () -> 
transformer.apply(jsc(), spark(), original, properties));
   }
 
+  @Test

Review Comment:
   🤖 nit: the new tests repeat the same properties/transformer setup and the 
null-count assertion; would it make sense to pull these into small helpers?
   
   <sub><i>⚠️ AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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