deniskuzZ commented on code in PR #6259:
URL: https://github.com/apache/hive/pull/6259#discussion_r2719656871
##########
ql/src/java/org/apache/hadoop/hive/ql/ddl/table/info/desc/DescTableOperation.java:
##########
@@ -127,7 +127,7 @@ private Table getTable() throws HiveException {
private Partition getPartition(Table table) throws HiveException {
Partition part = null;
if (desc.getPartitionSpec() != null) {
- part = context.getDb().getPartition(table, desc.getPartitionSpec(),
false);
+ part = context.getDb().getPartition(table, desc.getPartitionSpec());
Review Comment:
````
Map<String, String> partitionSpec = getPartitionSpec(db, tableTypeExpr,
tableName);
if (partitionSpec != null) {
// validate that partition exists
PartitionUtils.getPartition(db, table, partitionSpec, true);
}
````
and
````
private Partition getPartition(Table table) throws HiveException {
Partition part = null;
if (desc.getPartitionSpec() != null) {
part = context.getDb().getPartition(table, desc.getPartitionSpec());
if (part == null) {
throw new HiveException(ErrorMsg.INVALID_PARTITION,
StringUtils.join(desc.getPartitionSpec().keySet(), ','),
desc.getDbTableName());
}
}
return part;
}
````
doesn't make any sense and is expensive
--
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]