lokeshj1703 commented on code in PR #12349:
URL: https://github.com/apache/hudi/pull/12349#discussion_r1861799017


##########
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/HoodieSparkIndexClient.java:
##########
@@ -86,9 +92,45 @@ public static HoodieSparkIndexClient 
getInstance(SparkSession sparkSession) {
 
   @Override
   public void create(HoodieTableMetaClient metaClient, String userIndexName, 
String indexType, Map<String, Map<String, String>> columns, Map<String, String> 
options) throws Exception {
+    if (indexType.equals(PARTITION_NAME_SECONDARY_INDEX) || 
indexType.equals(PARTITION_NAME_BLOOM_FILTERS)
+        || indexType.equals(PARTITION_NAME_COLUMN_STATS)) {
+      createGenericIndex(metaClient, userIndexName, indexType, columns, 
options);
+    } else {
+      createRecordIndex(metaClient, userIndexName, indexType);

Review Comment:
   Yes, all the error cases are handled already.
   Record index related scenarios in TestIndexSyntax(Test Create and Drop Index 
Syntax with Simple record key, Test Create and Drop Index Syntax with Complex 
record key)
   
   Secondary Index - 
   TestSecondaryIndex(Test Create/Show/Drop Secondary Index)
   
   Expression Index
   TestExpressionIndex(Test Create Expression Index, 
testBloomFiltersIndexPruning)



##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -332,13 +332,13 @@ public String 
getIndexNameWithoutPrefix(HoodieIndexDefinition indexDefinition) {
    */
   public static boolean isGenericIndex(String metadataPartitionPath) {

Review Comment:
   Addressed



##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -332,13 +332,13 @@ public String 
getIndexNameWithoutPrefix(HoodieIndexDefinition indexDefinition) {
    */
   public static boolean isGenericIndex(String metadataPartitionPath) {
     return metadataPartitionPath.startsWith(SECONDARY_INDEX.getPartitionPath())
-        || 
metadataPartitionPath.startsWith(FUNCTIONAL_INDEX.getPartitionPath());
+        || 
metadataPartitionPath.startsWith(EXPRESSION_INDEX.getPartitionPath());

Review Comment:
   Addressed



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