kasakrisz commented on a change in pull request #2991:
URL: https://github.com/apache/hive/pull/2991#discussion_r802348206
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/stats/BasicStatsTask.java
##########
@@ -512,6 +513,9 @@ private String toString(Map<String, String> parameters) {
if (dpPartSpecs != null) {
// load the list of DP partitions and return the list of partition
specs
list.addAll(dpPartSpecs);
+ // Reload partition metadata because another BasicStatsTask instance
may have updated the stats.
+ List<String> partNames =
list.stream().map(Partition::getName).collect(Collectors.toList());
Review comment:
Initially I didn't want to refactor this method just provide a simple
fix to the correctness issue.
Thanks for your suggestions these are small changes and makes sense to me so
I'm open to expand a bit the scope of this patch.
My last commit is also a refactor: since the stream is created over the
`dbPartSpecs` the `list` object became unnecessary in this if branch. So I
decided to remove it completely.
Let's see how ptest performs with this change.
--
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]