vikramahuja1001 commented on code in PR #4912: URL: https://github.com/apache/hive/pull/4912#discussion_r1413409425
########## ql/src/test/org/apache/hadoop/hive/ql/exec/TestGetPartitionInBatches.java: ########## @@ -256,4 +258,21 @@ public void testBatchingWhenException() throws Exception { // In case any duplicate/incomplete list is given by hive.getAllPartitionsInBatches, the below assertion will fail assert(partNames.size() == 0); } + + @Test + public void testBatchingWhenBatchSizeIsZero() throws MetaException { + HiveMetaStoreClient spyMSC = spy(msc); + hive.setMSC(spyMSC); + int batchSize = 0; + try { + new PartitionIterable(hive, hive.getTable(dbName, tableName), null, batchSize); + } catch (HiveException e) { + Assert.assertTrue(e.getMessage().contains("Batch Size for Partition Iterable should be > 0")); Review Comment: I have just changed the error message here for now. Though i do agree about the clarity of the nature for every exception. -- 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-unsubscr...@hive.apache.org 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