You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "vikramahuja1001 (via GitHub)" <gi...@apache.org> on 2023/12/07 06:34:27 UTC

Re: [PR] HIVE-27804 Implement batching in various getPartition calls which return auth info along with Partition List [hive]

vikramahuja1001 commented on code in PR #4807:
URL: https://github.com/apache/hive/pull/4807#discussion_r1418455651


##########
ql/src/java/org/apache/hadoop/hive/ql/metadata/PartitionIterable.java:
##########
@@ -150,18 +157,36 @@ public PartitionIterable(Hive db, Table table, Map<String, String> partialPartit
     this(db, table, partialPartitionSpec, batchSize, false);
   }
 
+  public PartitionIterable(Hive db, Table table, Map<String, String> partialPartitionSpec,
+                           int batchSize, boolean isAuthRequired, String userName,
+                           List<String> groupNames) throws HiveException {
+    this(db, table, partialPartitionSpec, batchSize, false, isAuthRequired, userName, groupNames);
+  }
+
+
   /**
    * Primary constructor that fetches all partitions in a given table, given
    * a Hive object and a table object, and a partial partition spec.
    */
   public PartitionIterable(Hive db, Table table, Map<String, String> partialPartitionSpec,
-                           int batchSize, boolean getColStats) throws HiveException {
+       int batchSize, boolean getColStats) throws HiveException {
+    this(db, table, partialPartitionSpec, batchSize, getColStats, false, null, null);
+  }
+
+  public PartitionIterable(Hive db, Table table, Map<String, String> partialPartitionSpec,
+       int batchSize, boolean getColStats, boolean isAuthRequired, String userName,
+       List<String> groupNames) throws HiveException {
     this.currType = Type.LAZY_FETCH_PARTITIONS;
     this.db = db;
     this.table = table;
     this.partialPartitionSpec = partialPartitionSpec;
     this.batchSize = batchSize;
     this.getColStats = getColStats;
+    this.isAuthRequired = isAuthRequired;
+    if (isAuthRequired) {

Review Comment:
   made the necessary changes



##########
ql/src/test/org/apache/hadoop/hive/ql/exec/PartitionUtil.java:
##########
@@ -82,4 +88,26 @@ public static Set<CheckResult.PartitionResult> createPartsNotInMs(int numOfParts
         }
         return partsNotInMs;
     }
+
+
+    public static void addPartitions(IMetaStoreClient db, String dbName, String tableName, String location,
+         HiveConf hiveConf) throws Exception {
+        List<Partition> partitions = new ArrayList<>();
+        for (int i = 0; i < 30; i++) {

Review Comment:
   changed



-- 
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