justinborromeo commented on a change in pull request #6888: Fix num_rows in 
sys.segments
URL: https://github.com/apache/incubator-druid/pull/6888#discussion_r254824871
 
 

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/schema/SegmentMetadataHolder.java
 ##########
 @@ -91,14 +100,14 @@ public SegmentId getSegmentId()
     return segmentId;
   }
 
-  public Map<SegmentId, Set<String>> getReplicas()
+  public Set<String> getReplicas()
   {
-    return segmentServerMap;
+    return segmentServers;
   }
 
-  public long getNumReplicas(SegmentId segmentId)
+  public long getNumReplicas()
   {
-    return segmentServerMap.get(segmentId).size();
+    return segmentServers.size();
 
 Review comment:
   Why do we return long in this method when Set#size() returns an int?  Might 
not be worth changing because it might blow up other stuff.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to