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


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/bucket/ConsistentBucketStreamWriteFunction.java:
##########
@@ -53,15 +52,16 @@ public class ConsistentBucketStreamWriteFunction<I> extends 
StreamWriteFunction<
    *
    * @param config The config options
    */
-  public ConsistentBucketStreamWriteFunction(Configuration config) {
-    super(config);
+  public ConsistentBucketStreamWriteFunction(Configuration config, RowType 
rowType) {
+    super(config, rowType);
   }
 
   @Override
   public void open(Configuration parameters) throws IOException {
     super.open(parameters);
     List<String> indexKeyFields = 
Arrays.asList(config.getString(FlinkOptions.INDEX_KEY_FIELD).split(","));
     this.updateStrategy = new 
FlinkConsistentBucketUpdateStrategy(this.writeClient, indexKeyFields);
+    preparePayload();

Review Comment:
   `ConsistentBucketStreamWriteFunction::open` overrides 
`StreamWriteFunction::open`, but uses `StreamWriteFunction::processElement`. 
And in `StreamWriteFunction::processElement` `payloadCreation` should be 
already initialized.
   
   But if I will find a way to buffer `RowData` instead of `HoodieRecord` 
without breaking everything, then possibly there would be no need in this 
initialization.



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