deniskuzZ commented on a change in pull request #2772:
URL: https://github.com/apache/hive/pull/2772#discussion_r760247777
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/txn/compactor/Cleaner.java
##########
@@ -304,7 +321,7 @@ private ValidReaderWriteIdList
getValidCleanerWriteIdList(CompactionInfo ci, Tab
}
private static boolean isDynPartAbort(Table t, CompactionInfo ci) {
- return t.getPartitionKeys() != null && t.getPartitionKeys().size() > 0
+ return Optional.ofNullable(t).map(Table::getPartitionKeys).filter(pk ->
pk.size() > 0).isPresent()
Review comment:
`safe-delete` use case - table object would be null here
--
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]