lw309637554 commented on a change in pull request #2136:
URL: https://github.com/apache/hudi/pull/2136#discussion_r513951060



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieClient.java
##########
@@ -124,9 +128,30 @@ public HoodieWriteConfig getConfig() {
     return config;
   }
 
+  private void checkIndexTypeCompatible(String writeIndexType, String 
persistIndexType) {
+    if (writeIndexType.equals(persistIndexType)) {
+      return;
+    } else {
+      if ((persistIndexType.equals(HoodieIndex.IndexType.GLOBAL_BLOOM.name())
+          && (writeIndexType.equals(HoodieIndex.IndexType.BLOOM.name()) || 
writeIndexType.equals(HoodieIndex.IndexType.SIMPLE.name())))
+          || writeIndexType.equals(HoodieIndex.IndexType.INMEMORY.name())) {
+        return;
+      } else {
+        throw new HoodieException("The new write indextype " + writeIndexType

Review comment:
       @vinothchandar   i am doing persist the hoodieindex.indexType(). get 
indexType will first instantiate hoodieIndex,then get the indexType(). what do 
you think about this choice? 




----------------------------------------------------------------
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:
[email protected]


Reply via email to