danny0405 commented on code in PR #13498:
URL: https://github.com/apache/hudi/pull/13498#discussion_r2174044806


##########
hudi-common/src/main/java/org/apache/hudi/common/engine/HoodieReaderContext.java:
##########
@@ -307,6 +307,16 @@ public RecordMergeMode getMergeMode() {
    */
   public abstract Object getValue(T record, Schema schema, String fieldName);
 
+  /**
+   * Set the value of a specific field.
+   *
+   * @param record    The record in engine-specific type.
+   * @param schema    The Avro schema of the record.
+   * @param fieldName The field name. A dot separated string if a nested field.
+   * @param value     The new value for the field.
+   */
+  public abstract void setValue(T record, Schema schema, String fieldName, 
Object value);

Review Comment:
   This is a reader context for read paths, we should not add interface to 
modify the record on the spot, also it's error-prone to do this if the 
underneath engine row structure is reused.
   
   My idea is we collect all the new fields for partial merge and construct a 
new engine row with the reader context, for example, add a interface like 
`constructEngineRow(schema, fields)`.



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