nsivabalan commented on code in PR #13295:
URL: https://github.com/apache/hudi/pull/13295#discussion_r2103912518


##########
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java:
##########
@@ -148,6 +152,24 @@ public JavaRDD<WriteStatus> 
upsertPreppedRecords(JavaRDD<HoodieRecord<T>> preppe
     return postWrite(resultRDD, instantTime, table);
   }
 
+  /**
+   * Used for streaming writes to metadata table.
+   */
+  @Override
+  public JavaRDD<WriteStatus> upsertPreppedRecords(JavaRDD<HoodieRecord<T>> 
preppedRecords, String instantTime, Option<List<Pair<String, String>>> 
partitionFileIdPairsOpt) {
+    ValidationUtils.checkArgument(isMetadataTable, "This version of upsert 
prepped can only be invoked for metadata table");
+    HoodieTable<T, HoodieData<HoodieRecord<T>>, HoodieData<HoodieKey>, 
HoodieData<WriteStatus>> table =
+        initTable(WriteOperationType.UPSERT_PREPPED, 
Option.ofNullable(instantTime));
+    table.validateUpsertSchema();
+    if (!(partitionFileIdPairsOpt.isPresent() && 
partitionFileIdPairsOpt.get().get(0).getKey().equals(FILES.getPartitionPath())))
 {

Review Comment:
   👍 



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