yuanlihan commented on a change in pull request #9883:
URL: https://github.com/apache/druid/pull/9883#discussion_r446755581
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java
##########
@@ -333,33 +330,30 @@ public TableType getJdbcTableType()
root
))
.transform(val -> {
- try {
- if (segmentsAlreadySeen.contains(val.getKey())) {
- return null;
- }
- final PartialSegmentData partialSegmentData =
partialSegmentDataMap.get(val.getKey());
- final long numReplicas = partialSegmentData == null ? 0L :
partialSegmentData.getNumReplicas();
- return new Object[]{
- val.getKey(),
- val.getKey().getDataSource(),
- val.getKey().getInterval().getStart().toString(),
- val.getKey().getInterval().getEnd().toString(),
- val.getValue().getSegment().getSize(),
- val.getKey().getVersion(),
- (long)
val.getValue().getSegment().getShardSpec().getPartitionNum(),
- numReplicas,
- val.getValue().getNumRows(),
- IS_PUBLISHED_FALSE, // is_published is false for unpublished
segments
- // is_available is assumed to be always true for segments
announced by historicals or realtime tasks
- IS_AVAILABLE_TRUE,
- val.getValue().isRealtime(),
- IS_OVERSHADOWED_FALSE, // there is an assumption here that
unpublished segments are never overshadowed
- jsonMapper.writeValueAsString(val.getKey())
- };
- }
- catch (JsonProcessingException e) {
- throw new RE(e, "Error getting segment payload for segment %s",
val.getKey());
+ if (segmentsAlreadySeen.contains(val.getKey())) {
+ return null;
}
+ final PartialSegmentData partialSegmentData =
partialSegmentDataMap.get(val.getKey());
+ final long numReplicas = partialSegmentData == null ? 0L :
partialSegmentData.getNumReplicas();
+ return new Object[]{
+ val.getKey(),
+ val.getKey().getDataSource(),
+ val.getKey().getInterval().getStart().toString(),
+ val.getKey().getInterval().getEnd().toString(),
+ val.getValue().getSegment().getSize(),
+ val.getKey().getVersion(),
+ (long)
val.getValue().getSegment().getShardSpec().getPartitionNum(),
+ numReplicas,
+ val.getValue().getNumRows(),
+ IS_PUBLISHED_FALSE, // is_published is false for unpublished
segments
+ // is_available is assumed to be always true for segments
announced by historicals or realtime tasks
+ IS_AVAILABLE_TRUE,
+ val.getValue().isRealtime(),
+ IS_OVERSHADOWED_FALSE, // there is an assumption here that
unpublished segments are never overshadowed
+ null,
+ null,
+ null
Review comment:
Hi @surekhasaharan, I have filled these null fields.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]