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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/transform/RowDataToHoodieFunction.java:
##########
@@ -89,29 +79,17 @@ public void open(Configuration parameters) throws Exception 
{
     this.keyGenerator =
         HoodieAvroKeyGeneratorFactory
             .createKeyGenerator(flinkConf2TypedProperties(this.config));
-    this.payloadCreation = PayloadCreation.instance(config);
   }
 
-  @SuppressWarnings("unchecked")
   @Override
-  public O map(I i) throws Exception {
-    return (O) toHoodieRecord(i);
-  }
-
-  /**
-   * Converts the give record to a {@link HoodieRecord}.
-   *
-   * @param record The input record
-   * @return HoodieRecord based on the configuration
-   * @throws IOException if error occurs
-   */
-  @SuppressWarnings("rawtypes")
-  private HoodieRecord toHoodieRecord(I record) throws Exception {
+  public O map(I record) throws Exception {
+    // [HUDI-8969] Analyze how to get rid of excessive conversions, should be 
a subtask for RFC-88

Review Comment:
   Let's just switch to `RowDataKeyGen` and resolve the corner cases in 
separate PR, `CustomAvroKeyGenerator` does not even work for master branch 
actually.



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