codope commented on code in PR #13086:
URL: https://github.com/apache/hudi/pull/13086#discussion_r2027988656


##########
hudi-spark-datasource/hudi-spark/src/main/scala/org/apache/spark/sql/hudi/command/MergeIntoHoodieTableCommand.scala:
##########
@@ -1057,6 +1058,36 @@ object MergeIntoHoodieTableCommand {
       )
     }
   }
+
+  // Check if global index, e.g., GLOBAL_BLOOM, is set.
+  def useGlobalIndex(parameters: Map[String, String]): Boolean = {
+    parameters.get(HoodieIndexConfig.INDEX_TYPE.key).exists { indexType =>
+      isGlobalIndexEnabled(indexType, parameters)
+    }
+  }
+
+  // Check if goal index is enabled for specific indexes.
+  def isGlobalIndexEnabled(indexType: String, parameters: Map[String, 
String]): Boolean = {
+    Seq(
+      HoodieIndex.IndexType.GLOBAL_SIMPLE -> 
HoodieIndexConfig.SIMPLE_INDEX_UPDATE_PARTITION_PATH_ENABLE,

Review Comment:
   I get the intention that when update partition path is false, only then 
disable merge into partial update. But, would it be safer to take more 
conservative approach right now i.e. disable only when global index is enabled 
irrespective of partition path is true or not? Anyway, update partition path is 
true by default for global index right.



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