You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "Jackie-Jiang (via GitHub)" <gi...@apache.org> on 2023/03/02 01:23:02 UTC

[GitHub] [pinot] Jackie-Jiang commented on a diff in pull request #10366: Fix for flaky test ForwardIndexHandlerTest.testEnableDictionaryForMultipleColumns

Jackie-Jiang commented on code in PR #10366:
URL: https://github.com/apache/pinot/pull/10366#discussion_r1122505726


##########
pinot-segment-local/src/test/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandlerTest.java:
##########
@@ -1204,9 +1204,15 @@ public void testEnableDictionaryForMultipleColumns()
     IndexLoadingConfig indexLoadingConfig = new IndexLoadingConfig(null, _tableConfig);
 
     Random rand = new Random();
-    String col1 = _noDictionaryColumns.get(rand.nextInt(_noDictionaryColumns.size()));
+    String col1;
+    do {
+      col1 = _noDictionaryColumns.get(rand.nextInt(_noDictionaryColumns.size()));
+    } while (FORWARD_INDEX_DISABLED_RAW_COLUMNS.contains(col1));
     indexLoadingConfig.getNoDictionaryColumns().remove(col1);
-    String col2 = _noDictionaryColumns.get(rand.nextInt(_noDictionaryColumns.size()));
+    String col2;

Review Comment:
   Should we also ensure `col2` is different from `col1`



-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org