You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2023/09/02 03:48:48 UTC
[GitHub] [hive] wangyum commented on a diff in pull request #1948: HIVE-24741: get_partitions_ps_with_auth performance improvement
wangyum commented on code in PR #1948:
URL: https://github.com/apache/hive/pull/1948#discussion_r1313709638
##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/ObjectStore.java:
##########
@@ -3475,15 +3496,28 @@ public List<Partition> listPartitionsPsWithAuth(String catName, String db_name,
try {
openTransaction();
+
+ MTable mtbl = getMTable(catName, db_name, tbl_name);
+ if (mtbl == null) {
+ throw new NoSuchObjectException(
+ TableName.getQualified(catName, db_name, tbl_name) + " table not found");
+ }
+ boolean getauth = null != userName && null != groupNames &&
+ "TRUE".equalsIgnoreCase(
+ mtbl.getParameters().get("PARTITION_LEVEL_PRIVILEGE"));
+ if (!getauth && canTryDirectSQL(part_vals)) {
+ LOG.info(
+ "Redirecting to directSQL enabled API: db: {} tbl: {} partVals: {}",
+ db_name, tbl_name, Joiner.on(',').join(part_vals));
+ return getPartitions(catName, db_name, tbl_name, -1);
Review Comment:
Hi @vihangk1 Why change max_parts to -1? Can we change this line to:
```java
return getPartitions(catName, db_name, tbl_name, max_parts);
```
--
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-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org