kishendas commented on a change in pull request #1217:
URL: https://github.com/apache/hive/pull/1217#discussion_r451370702



##########
File path: 
standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
##########
@@ -1959,6 +1959,28 @@ public boolean listPartitionsByExpr(String catName, 
String db_name, String tbl_n
     return !r.isSetHasUnknownPartitions() || r.isHasUnknownPartitions(); // 
Assume the worst.
   }
 
+  @Override
+  public boolean listPartitionsSpecByExpr(PartitionsByExprRequest request, 
List<PartitionSpec> partitionSpec)
+      throws TException {
+    assert partitionSpec != null;
+    PartitionsSpecByExprResult result;
+    try {
+      result = client.get_partitions_spec_by_expr(request);
+    } catch (TApplicationException te) {
+      if (te.getType() != TApplicationException.UNKNOWN_METHOD
+          && te.getType() != TApplicationException.WRONG_METHOD_NAME) {
+        throw te;
+      }
+      throw new IncompatibleMetastoreException(
+          "Metastore doesn't support listPartitionsByExpr: " + 
te.getMessage());
+    }
+
+    result.setPartitionsSpec(FilterUtils.filterPartitionSpecsIfEnabled(
+        isClientFilterEnabled, filterHook, result.getPartitionsSpec()));
+
+    partitionSpec.addAll(result.getPartitionsSpec());
+    return !result.isSetHasUnknownPartitions() || 
result.isHasUnknownPartitions();
+  }

Review comment:
       Yes :-).




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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to