abstractdog commented on code in PR #6344:
URL: https://github.com/apache/hive/pull/6344#discussion_r2883680735
##########
kafka-handler/src/java/org/apache/hadoop/hive/kafka/KafkaDagCredentialSupplier.java:
##########
@@ -56,12 +54,9 @@ public Token<?> obtainToken(BaseWork work, Set<TableDesc>
fileSinkTableDescs, Co
if(!(work instanceof MapWork)){
return null;
}
- Map<String, PartitionDesc> partitions = ((MapWork)
work).getAliasToPartnInfo();
-
- // We don't need to iterate on all partitions, and check the same
TableDesc.
- PartitionDesc partition =
partitions.values().stream().findFirst().orElse(null);
- if (partition != null) {
- TableDesc tableDesc = partition.getTableDesc();
+ TableDesc mapWorkTableDesc = ((MapWork)
work).getDistinctTableDescs().stream().findFirst().orElse(null);
Review Comment:
I think we can eliminate one of these two variables (`tableDesc`,
`mapWorkTableDesc`)
--
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]