bziobrowski commented on code in PR #15591:
URL: https://github.com/apache/pinot/pull/15591#discussion_r2097307428
##########
pinot-segment-spi/src/main/java/org/apache/pinot/segment/spi/ColumnMetadata.java:
##########
@@ -90,7 +92,40 @@ default boolean isMinMaxValueInvalid() {
@Nullable
Set<Integer> getPartitions();
- Map<IndexType<?, ?, ?>, Long> getIndexSizeMap();
+ /**
+ * If exists, returns size of index for given index type; otherwise returns
-1.
+ * @param type index type
+ */
+ default long getIndexSizeFor(IndexType type) {
Review Comment:
Right now it's for testing (because production usage for the collection is
basically iteration) but, in general, it's better api. I've added the
annotation anyway. As for the overhead - I don't think there's anything to
worry about. The list is a few items-big at most, so lookup should is likely
faster in the older map implementation.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]