dclim commented on a change in pull request #6460: Add check for nullable
numRows
URL: https://github.com/apache/incubator-druid/pull/6460#discussion_r224919293
##########
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:
What about rewriting this as:
```
partialSegmentData == null || partialSegmentData.getNumRows() == null ? 0L :
partialSegmentData.getNumRows()
```
Do any of the other metrics need null checks?
----------------------------------------------------------------
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]