lirui-apache commented on a change in pull request #13157: URL: https://github.com/apache/flink/pull/13157#discussion_r473905054
########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java ########## @@ -777,8 +777,11 @@ public void dropPartition(ObjectPath tablePath, CatalogPartitionSpec partitionSp // partition spec can be partial List<String> partialVals = HiveReflectionUtils.getPvals(hiveShim, hiveTable.getPartitionKeys(), partitionSpec.getPartitionSpec()); + checkValidPartitionSpec(partitionSpec, getFieldNames(hiveTable.getPartitionKeys()), tablePath); return client.listPartitionNames(tablePath.getDatabaseName(), tablePath.getObjectName(), partialVals, (short) -1).stream().map(HiveCatalog::createPartitionSpec).collect(Collectors.toList()); + } catch (PartitionSpecInvalidException e) { Review comment: Why do we need to catch the exception and throw another one? ########## File path: flink-connectors/flink-connector-hive/src/main/java/org/apache/flink/table/catalog/hive/HiveCatalog.java ########## @@ -777,8 +777,11 @@ public void dropPartition(ObjectPath tablePath, CatalogPartitionSpec partitionSp // partition spec can be partial List<String> partialVals = HiveReflectionUtils.getPvals(hiveShim, hiveTable.getPartitionKeys(), partitionSpec.getPartitionSpec()); + checkValidPartitionSpec(partitionSpec, getFieldNames(hiveTable.getPartitionKeys()), tablePath); Review comment: This should be done before we call `HiveReflectionUtils.getPvals` ---------------------------------------------------------------- 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