chinnaraolalam commented on code in PR #5000: URL: https://github.com/apache/hive/pull/5000#discussion_r1665939418
########## itests/hive-unit/src/test/java/org/apache/hive/jdbc/TestJdbcDriver2.java: ########## @@ -3422,4 +3422,51 @@ public void testHeaderFooterNonTextFiles() throws Exception { stmt.close(); } } + /** + * These test methods validate the error handling when attempting to load data from a non-existent file into different types of Hive tables. + * Each test creates a specific type of table ( dynamically partitioned, or bucketed), and then attempts to load data from a non-existent file. + * The tests pass if an exception is thrown with a message containing the string "Invalid path". + */ + @Test + public void testLoadDataNegativeForDynamicPartition() throws Exception { + HiveStatement stmt = (HiveStatement) con.createStatement(); + try { + stmt.execute("drop table if exists T"); + stmt.execute("create table T (a int, b int) partitioned by (p int) stored as orc"); + stmt.execute("set hive.exec.dynamic.partition=true"); Review Comment: Why we need to set these parameters explicitly, we can test with default values only. All the test cases have these parameters every where, we can test with default values unless any explicit case we need test. -- 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