You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "npawar (via GitHub)" <gi...@apache.org> on 2023/06/02 18:57:58 UTC

[GitHub] [pinot] npawar commented on a diff in pull request #10835: [feature] Add flags to indicate if FST, H3, and Text indexes are on a segment

npawar commented on code in PR #10835:
URL: https://github.com/apache/pinot/pull/10835#discussion_r1214713039


##########
pinot-server/src/main/java/org/apache/pinot/server/api/resources/SegmentMetadataFetcher.java:
##########
@@ -152,6 +155,24 @@ private static Map<String, String> getColumnIndexes(DataSource dataSource) {
       indexStatus.put(JSON_INDEX, INDEX_AVAILABLE);
     }
 
+    if (Objects.isNull(dataSource.getH3Index())) {
+      indexStatus.put(H3_INDEX, INDEX_NOT_AVAILABLE);
+    } else {
+      indexStatus.put(H3_INDEX, INDEX_AVAILABLE);
+    }
+
+    if (Objects.isNull(dataSource.getFSTIndex())) {
+      indexStatus.put(FST_INDEX, INDEX_NOT_AVAILABLE);
+    } else {
+      indexStatus.put(FST_INDEX, INDEX_AVAILABLE);
+    }
+
+    if (Objects.isNull(dataSource.getTextIndex())) {
+      indexStatus.put(TEXT_INDEX, INDEX_NOT_AVAILABLE);
+    } else {
+      indexStatus.put(TEXT_INDEX, INDEX_AVAILABLE);
+    }

Review Comment:
   good point.. i think it's safe to push this change regardless, and then refactor using getAllIndexes, as doing that will not change the final response returned but just how we reach that answer. Perhaps add a todo and take it as a followup?



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