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


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -738,8 +742,8 @@ void initializeFilegroupsAndCommit(MetadataPartitionType 
partitionType,
   }
 
   private void initializeFilegroupsAndCommitToRecordIndexPartition(String 
commitTimeForPartition,
-                                                                   
Lazy<List<Pair<String, FileSlice>>> lazyLatestMergedPartitionFileSliceList) 
throws IOException {
-    if (dataWriteConfig.isPartitionedRecordIndexEnabled()) {
+                                                                   
Lazy<List<Pair<String, FileSlice>>> lazyLatestMergedPartitionFileSliceList, 
boolean isPartitioned) throws IOException {

Review Comment:
   Addressed



##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -476,7 +478,9 @@ private boolean initializeFromFilesystem(String 
dataTableInstantTime, List<Metad
             initializeFilegroupsAndCommit(partitionType, 
COLUMN_STATS.getPartitionPath(), fileGroupCountAndRecordsPair, 
instantTimeForPartition, colStatsColumnsAndRecord.getKey());
             break;
           case RECORD_INDEX:
-            
initializeFilegroupsAndCommitToRecordIndexPartition(instantTimeForPartition, 
lazyLatestMergedPartitionFileSliceList);
+            boolean isPartitioned = 
dataWriteConfig.isPartitionedRecordIndexEnabled();
+            createRecordIndexDefinition(dataMetaClient, 
Collections.singletonMap(HoodieRecordIndex.IS_PARTITIONED_OPTION, 
String.valueOf(isPartitioned)));

Review Comment:
   Addressed



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/TestRecordLevelIndex.scala:
##########


Review Comment:
   Addressed



##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/hudi/functional/RecordLevelIndexTestBase.scala:
##########


Review Comment:
   Addressed



##########
hudi-hadoop-common/src/test/java/org/apache/hudi/common/table/TestHoodieTableMetaClient.java:
##########
@@ -276,7 +276,7 @@ void testDeleteDefinition() throws IOException {
     assertTrue(metaClient.getIndexForMetadataPartition(indexName).isPresent());
     assertTrue(metaClient.getStorage().exists(new 
StoragePath(metaClient.getIndexDefinitionPath())));
     metaClient.deleteIndexDefinition(indexName);
-    assertTrue(metaClient.getIndexMetadata().isEmpty());

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