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

 ##########
 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:
   It used to be int, and then got changed to long at some point. The reason is 
because we support nulls for long 
[here](https://github.com/apache/incubator-druid/blob/master/sql/src/main/java/org/apache/druid/sql/calcite/table/RowSignature.java#L156),
 but not for ints ? Not very sure...but will likely leave it to be long here.

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