Jackie-Jiang commented on code in PR #15332:
URL: https://github.com/apache/pinot/pull/15332#discussion_r2006262224


##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/TableViews.java:
##########
@@ -170,6 +187,27 @@ public List<SegmentStatusInfo> 
getSegmentStatuses(TableViews.TableView externalV
     return segmentStatusInfoList;
   }
 
+  public TableView getSegmentsView(TableViews.TableView tableView, 
List<String> segmentNames) {
+    TableView tableViewResult = new TableView();
+    if (tableView._offline != null) {
+      tableViewResult._offline = new HashMap<>();
+      for (String segmentName : segmentNames) {
+        if (tableView._offline.get(segmentName) != null) {

Review Comment:
   (minor) Put `tableView._offline.get(segmentName)` into a local variable to 
reduce an extra map access



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

Reply via email to