Jibing-Li commented on code in PR #41348:
URL: https://github.com/apache/doris/pull/41348#discussion_r1776595559
##########
fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java:
##########
@@ -1581,11 +1582,32 @@ public long getRowCountForIndex(long indexId, boolean
strict) {
if (strict && !index.getRowCountReported()) {
return -1;
}
- rowCount += (index == null || index.getRowCount() == -1) ? 0 :
index.getRowCount();
+ rowCount += index.getRowCount() == -1 ? 0 : index.getRowCount();
}
Review Comment:
Should be not null. If the index is not exist, I feel throw an NPE is better
than return -1 silently.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]