clintropolis commented on a change in pull request #6460: Add check for
nullable numRows
URL: https://github.com/apache/incubator-druid/pull/6460#discussion_r224921226
##########
File path:
sql/src/main/java/org/apache/druid/sql/calcite/schema/SystemSchema.java
##########
@@ -244,7 +244,10 @@ public TableType getJdbcTableType()
val.getVersion(),
val.getShardSpec().getPartitionNum(),
partialSegmentData == null ? 0L :
partialSegmentData.getNumReplicas(),
- partialSegmentData == null ? 0L :
partialSegmentData.getNumRows(),
+ partialSegmentData == null ? 0L
Review comment:
I think i'd be in favor of moving this outside and assigning variables
instead of the 4 repeated checks of `partialSegmentData == null`, e.g.
```
long numReplicas, numRows, isRealtime = 0L, isAvailable = 1L;
if (partialSegment != null) {
...
}
```
----------------------------------------------------------------
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]