morningman commented on a change in pull request #4375: URL: https://github.com/apache/incubator-doris/pull/4375#discussion_r471542377
########## File path: fe/fe-core/src/main/java/org/apache/doris/catalog/OlapTable.java ########## @@ -556,7 +556,9 @@ public KeysType getKeysType() { } public KeysType getKeysTypeByIndexId(long indexId) { - return indexIdToMeta.get(indexId).getKeysType(); + MaterializedIndexMeta indexMeta = indexIdToMeta.get(indexId); + Preconditions.checkNotNull(indexMeta); Review comment: You can add some message if you want to check it. ```suggestion Preconditions.checkNotNull(indexMeta, "index id: " + indexId); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org