deniskuzZ commented on code in PR #5063: URL: https://github.com/apache/hive/pull/5063#discussion_r1523105974
########## ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java: ########## @@ -3199,19 +3199,24 @@ public Map<Map<String, String>, Partition> loadDynamicPartitions(final LoadTable partitionNames.add(Warehouse.makeDynamicPartNameNoTrailingSeperator(details.fullSpec)); } } - List<Partition> partitions = Hive.get().getPartitionsByNames(tbl, partitionNames); - for(Partition partition : partitions) { - LOG.debug("HMS partition spec: {}", partition.getSpec()); - partitionDetailsMap.entrySet().parallelStream() - .filter(entry -> entry.getValue().fullSpec.equals(partition.getSpec())) - .findAny().ifPresent(entry -> { - entry.getValue().partition = partition; - entry.getValue().hasOldPartition = true; - }); - } - // no need to fetch partition again in tasks since we have already fetched partitions - // info in getPartitionsByNames() - fetchPartitionInfo = false; + try { + List<Partition> partitions = Hive.get().getPartitionsByNames(tbl, partitionNames); + for(Partition partition : partitions) { + LOG.debug("HMS partition spec: {}", partition.getSpec()); + partitionDetailsMap.entrySet().parallelStream() + .filter(entry -> entry.getValue().fullSpec.equals(partition.getSpec())) + .findAny().ifPresent(entry -> { + entry.getValue().partition = partition; + entry.getValue().hasOldPartition = true; + }); + } + // no need to fetch partition again in tasks since we have already fetched partitions + // info in getPartitionsByNames() + fetchPartitionInfo = false; + } catch (HiveException e) { + // Failed to fetch partitions in some cases (e.g., partition number limit) + LOG.warn("Fetching partitions by names failed.", e); Review Comment: i don't see how this change is relevant to the PR, also we should propagate the exception back to the client -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org