voonhous commented on code in PR #17876:
URL: https://github.com/apache/hudi/pull/17876#discussion_r2693052645


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/ProtoConversionUtil.java:
##########
@@ -105,41 +107,23 @@ public static GenericRecord convertToAvro(HoodieSchema 
schema, Message message)
     return AvroSupport.convert(schema, message);
   }
 
+  @AllArgsConstructor
+  @Getter
   public static class SchemaConfig {
+
+    // if true, to treat wrapped primitives like record with a single "value" 
field. If false, treat them as a nullable field
     private final boolean wrappedPrimitivesAsRecords;
+    // the number of times to unravel a recursive proto schema before spilling 
the rest to bytes
     private final int maxRecursionDepth;
+    // if true convert {@link Timestamp} to a Record with a seconds and nanos 
field. If false, convert it to a long with the timestamp-mircos logical type.
     private final boolean timestampsAsRecords;
 
-    /**
-     * Configuration used when generating a schema for a proto class.
-     * @param wrappedPrimitivesAsRecords if true, to treat wrapped primitives 
like record with a single "value" field. If false, treat them as a nullable 
field
-     * @param maxRecursionDepth the number of times to unravel a recursive 
proto schema before spilling the rest to bytes
-     * @param timestampsAsRecords if true convert {@link Timestamp} to a 
Record with a seconds and nanos field. If false, convert it to a long with the 
timestamp-mircos logical type.
-     */

Review Comment:
   It's actually preserved. Only thing not preserved is:
   `Configuration used when generating a schema for a proto class.`. I'll put 
this above `@AllArgsConstructor`.
   
   The individual param descriptions are added as comments above each 
attribute/fields.



##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/IncrSourceHelper.java:
##########
@@ -345,27 +347,18 @@ public static Dataset<Row> coalesceOrRepartition(Dataset 
dataset, int numPartiti
   /**
    * Kafka reset offset strategies.
    */
+  @AllArgsConstructor
+  @Getter
+  @ToString
   public enum MissingCheckpointStrategy {
     READ_LATEST("Read from latest commit in hoodie source table"),
     READ_UPTO_LATEST_COMMIT("Read everything upto latest commit");
 
+    @Getter
     private final String description;
 
-    MissingCheckpointStrategy(String description) {
-      this.description = description;
-    }
-
-    public String getDescription() {
-      return description;
-    }
-
     private static MissingCheckpointStrategy nullEnum() {
       return null;
     }
-
-    @Override
-    public String toString() {

Review Comment:
   I'm okay with leaving it as is, any particular reason why?
   
   The generated string feels a little more informative:
   
   ```java
       public String toString() {
         String var10000 = this.name();
         return "IncrSourceHelper.MissingCheckpointStrategy." + var10000 + 
"(description=" + this.getDescription() + ")";
       }
   ```
   
   LMK



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