[
https://issues.apache.org/jira/browse/HIVE-26278?focusedWorklogId=777355&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-777355
]
ASF GitHub Bot logged work on HIVE-26278:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 02/Jun/22 08:43
Start Date: 02/Jun/22 08:43
Worklog Time Spent: 10m
Work Description: zabetak commented on code in PR #3335:
URL: https://github.com/apache/hive/pull/3335#discussion_r887717257
##########
ql/src/test/org/apache/hadoop/hive/ql/metadata/TestHiveMetaStoreClientApiArgumentsChecker.java:
##########
@@ -146,6 +151,26 @@ public void testGetPartitionsByNames3() throws
HiveException {
hive.getPartitionsByNames(t, new ArrayList<>(), true);
}
+ @Test
+ public void testGetPartitionsByNamesWithSingleBatch() throws HiveException {
+ hive.getPartitionsByNames(t, Arrays.asList("Greece", "Italy"), true);
+ }
+
+ @Test
+ public void testGetPartitionsByNamesWithMultipleEqualSizeBatches()
+ throws HiveException {
+ List<String> names = Arrays.asList("Greece", "Italy", "France", "Spain");
+ hive.getPartitionsByNames(t, names, true);
+ }
+
+ @Test
+ public void testGetPartitionsByNamesWithMultipleUnequalSizeBatches()
+ throws HiveException {
+ List<String> names =
+ Arrays.asList("Greece", "Italy", "France", "Spain", "Hungary");
+ hive.getPartitionsByNames(t, names, true);
Review Comment:
The goal of the tests in this class are explained in the javadoc of
`TestHiveMetaStoreClient`.
> Tests in this class ensure that both tableId and validWriteIdList are sent
from HS2
Asserting more things seems to be out of scope for this PR.
Issue Time Tracking
-------------------
Worklog Id: (was: 777355)
Time Spent: 1h (was: 50m)
> Add unit tests for Hive#getPartitionsByNames using batching
> -----------------------------------------------------------
>
> Key: HIVE-26278
> URL: https://issues.apache.org/jira/browse/HIVE-26278
> Project: Hive
> Issue Type: Sub-task
> Components: HiveServer2
> Reporter: Stamatis Zampetakis
> Assignee: Stamatis Zampetakis
> Priority: Major
> Labels: pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> [Hive#getPartitionsByNames|https://github.com/apache/hive/blob/6626b5564ee206db5a656d2f611ed71f10a0ffc1/ql/src/java/org/apache/hadoop/hive/ql/metadata/Hive.java#L4155]
> supports decomposing requests in batches but there are no unit tests
> checking for the ValidWriteIdList when batching is used.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)