ege-st commented on code in PR #12334: URL: https://github.com/apache/pinot/pull/12334#discussion_r1470170103
########## pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java: ########## @@ -283,9 +284,17 @@ 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(); + } + TableMetadataInfo tableMetadataInfo = new TableMetadataInfo(tableDataManager.getTableName(), totalSegmentSizeBytes, segmentDataManagers.size(), - totalNumRows, columnLengthMap, columnCardinalityMap, maxNumMultiValuesMap, columnIndexSizesMap); + totalNumRows, columnLengthMap, columnCardinalityMap, maxNumMultiValuesMap, columnIndexSizesMap, + upsertPartitionToPrimaryKeyCountMap); Review Comment: Is there anything to worry about with compatibility by adding a new field to the response message? -- 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