You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2020/04/09 05:47:16 UTC

[GitHub] [incubator-hudi] vinothchandar commented on a change in pull request #1457: [HUDI-741] Added checks to validate Hoodie's schema evolution.

vinothchandar commented on a change in pull request #1457: [HUDI-741] Added checks to validate Hoodie's schema evolution.
URL: https://github.com/apache/incubator-hudi/pull/1457#discussion_r405969176
 
 

 ##########
 File path: hudi-client/src/main/java/org/apache/hudi/client/HoodieWriteClient.java
 ##########
 @@ -487,6 +492,58 @@ private void saveWorkloadProfileMetadataToInflight(WorkloadProfile profile, Hood
     return updateIndexAndCommitIfNeeded(writeStatusRDD, hoodieTable, instantTime);
   }
 
+  /**
+   * Ensure that the current writerSchema is compatible with the latest schema of this dataset.
+   *
+   * When inserting/updating data, we read records using the schema saved in the data/log files
+   * and convert them to the GenericRecords with writerSchema. Hence, we need to ensure that
+   * this conversion can take place without errors.
+   *
+   * @param hoodieTable The Hoodie Table
+   * @param isUpsert If this is a check during upserts
+   * @throws HoodieUpsertException If schema check fails during upserts
+   * @throws HoodieInsertException If schema check fails during inserts
+   */
+  private void validateSchema(HoodieTable<T> hoodieTable, final boolean isUpsert)
 
 Review comment:
   there is a pending PR to move this code into the new `table.action` package.. FYI.. this may need to move there as well 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services