KKcorps commented on code in PR #12334: URL: https://github.com/apache/pinot/pull/12334#discussion_r1482466264
########## pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java: ########## @@ -283,9 +284,23 @@ public String getSegmentMetadata( } } + // fetch partition to primary key count for realtime tables that have upsert enabled + Map<Integer, Long> upsertPartitionToPrimaryKeyCountMap = new HashMap<>(); + if (tableDataManager instanceof RealtimeTableDataManager) { + RealtimeTableDataManager realtimeTableDataManager = (RealtimeTableDataManager) tableDataManager; + upsertPartitionToPrimaryKeyCountMap = realtimeTableDataManager.getUpsertPartitionToPrimaryKeyCount(); Review Comment: Good callout. IMO, if upsert is not enabled we should return -1 and not 0 -- 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