walterddr commented on code in PR #9733: URL: https://github.com/apache/pinot/pull/9733#discussion_r1015816168
########## pinot-server/src/main/java/org/apache/pinot/server/api/resources/SegmentMetadataFetcher.java: ########## @@ -108,48 +111,55 @@ private static Map<String, Map<String, String>> getIndexesForSegmentColumns(Segm * Helper to loop through column datasource to create a index map as follows for each column: * {<"bloom-filter", "YES">, <"dictionary", "NO">} */ - private static Map<String, String> getColumnIndexes(DataSource dataSource) { + private static Map<String, String> getColumnIndexes(DataSource dataSource, ColumnMetadata columnMetadata) { Map<String, String> indexStatus = new LinkedHashMap<>(); if (Objects.isNull(dataSource.getBloomFilter())) { indexStatus.put(BLOOM_FILTER, INDEX_NOT_AVAILABLE); } else { - indexStatus.put(BLOOM_FILTER, INDEX_AVAILABLE); + Long indexSize = columnMetadata.getIndexSizeMap().get(ColumnIndexType.BLOOM_FILTER); + indexStatus.put(BLOOM_FILTER, indexSize == null ? INDEX_AVAILABLE : String.valueOf(indexSize)); } if (Objects.isNull(dataSource.getDictionary())) { indexStatus.put(DICTIONARY, INDEX_NOT_AVAILABLE); } else { - indexStatus.put(DICTIONARY, INDEX_AVAILABLE); + Long indexSize = columnMetadata.getIndexSizeMap().get(ColumnIndexType.DICTIONARY); Review Comment: ah I see the confusion. so together with #9712 . we have 4 APIs touched - `/tables/{tableName}/segments/{segmentName}/metadata` (modified in #9712) - `/segments/{tableName}/metadata` is also affected by the same code change - `/tables/{tableName}/metadata` (current PR modified this) - `/segments/{tableNameWithType}/{segmentName}` (this PR used to modify this but not anymore, b/c i found out that it is also used by the UI and it breaks the UI) -- 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-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org