jon-wei commented on a change in pull request #7425: Add is_overshadowed column 
to sys.segments table
URL: https://github.com/apache/incubator-druid/pull/7425#discussion_r274727893
 
 

 ##########
 File path: 
sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java
 ##########
 @@ -250,23 +256,24 @@ public TableType getJdbcTableType()
                 isRealtime = partialSegmentData.isRealtime();
               }
               return new Object[]{
-                  val.getId(),
-                  val.getDataSource(),
-                  val.getInterval().getStart().toString(),
-                  val.getInterval().getEnd().toString(),
-                  val.getSize(),
-                  val.getVersion(),
-                  Long.valueOf(val.getShardSpec().getPartitionNum()),
+                  segment.getId(),
+                  segment.getDataSource(),
+                  segment.getInterval().getStart().toString(),
+                  segment.getInterval().getEnd().toString(),
+                  segment.getSize(),
+                  segment.getVersion(),
+                  Long.valueOf(segment.getShardSpec().getPartitionNum()),
                   numReplicas,
                   numRows,
-                  1L, //is_published is true for published segments
+                  PUBLISHED_IS_PUBLISHED_VALUE, //is_published is true for 
published segments
                   isAvailable,
                   isRealtime,
+                  val.isOvershadowed() ? 1L : 0L,
 
 Review comment:
   this should use the constants instead of 1L and 0L

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