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


##########
hudi-utilities/src/test/java/org/apache/hudi/utilities/TestHoodieIndexer.java:
##########
@@ -179,6 +181,70 @@ public void testIndexerForRecordIndex() {
         "streamer-config/indexer-record-index.properties");
   }
 
+  /**
+   * Test indexer for RLI and secondary index.
+   */
+  @Test
+  public void testIndexerForSecondaryIndex() {
+    String tableName = "indexer_test_rli_si";
+    // enable files and bloom_filters only with the regular write client
+    HoodieMetadataConfig.Builder metadataConfigBuilder = 
HoodieMetadataConfig.newBuilder()
+        .enable(true)
+        .withAsyncIndex(false).withMetadataIndexColumnStats(false);
+    upsertToTable(metadataConfigBuilder.build(), tableName);
+
+    // validate table config
+    metaClient = reload(metaClient);
+    
assertTrue(metaClient.getTableConfig().getMetadataPartitions().contains(FILES.getPartitionPath()));
+
+    // build RLI
+    indexMetadataPartitionsAndAssert(RECORD_INDEX, 
Collections.singletonList(FILES), Arrays.asList(new MetadataPartitionType[] 
{COLUMN_STATS, BLOOM_FILTERS}), tableName,
+        "streamer-config/indexer-record-index.properties");
+    // rebuild metadata config with secondary index name and indexed column
+    String indexName = "idx_name";
+    /*metadataConfigBuilder = HoodieMetadataConfig.newBuilder()
+        .enable(true)
+        .withAsyncIndex(false).withMetadataIndexColumnStats(false)
+        .withSecondaryIndexName(indexName)
+        .withSecondaryIndexForColumn("name");
+    upsertToTable(metadataConfigBuilder.build(), tableName);*/

Review Comment:
   removed



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