abstractdog commented on code in PR #5916: URL: https://github.com/apache/hive/pull/5916#discussion_r2179864239
########## itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java: ########## @@ -1052,17 +1052,22 @@ public void testHplSqlContinueConditionHandler() throws Throwable { @Test public void testHplSqlExitConditionHandler() throws Throwable { String scriptText = - "CREATE PROCEDURE p1()\n" + + "DROP TABLE IF EXISTS result;\n" + + "CREATE TABLE result (s string);\n" + + "CREATE PROCEDURE p1()\n" + "BEGIN\n" + - " PRINT('Exit CONDITION Handler invoked.');\n" + + " INSERT INTO result VALUES('Exit CONDITION Handler invoked.');\n" + "END;\n" + - "DECLARE cnt_condition CONDITION;\n" + - "DECLARE EXIT HANDLER FOR cnt_condition\n" + - " p1();\n" + - "IF 1 <> 2 THEN\n" + - " SIGNAL cnt_condition;\n" + - "END IF;"; - testScriptFile(scriptText, args(), "Exit CONDITION Handler invoked.", OutStream.ERR); + "CREATE PROCEDURE p2()" + + "BEGIN\n" + + " DECLARE exit_condition CONDITION;\n" + + " DECLARE EXIT HANDLER FOR exit_condition\n" + + " p1();\n" + + " SIGNAL exit_condition;\n" + + "END;\n" + + "p2();" + + "SELECT * FROM result;"; + testScriptFile(scriptText, args(), "Exit CONDITION Handler invoked."); Review Comment: sorry I don't get: where do we exactly SELECT from that table? ########## itests/hive-unit/src/test/java/org/apache/hive/beeline/TestHplSqlViaBeeLine.java: ########## @@ -1052,17 +1052,22 @@ public void testHplSqlContinueConditionHandler() throws Throwable { @Test public void testHplSqlExitConditionHandler() throws Throwable { String scriptText = - "CREATE PROCEDURE p1()\n" + + "DROP TABLE IF EXISTS result;\n" + + "CREATE TABLE result (s string);\n" + + "CREATE PROCEDURE p1()\n" + "BEGIN\n" + - " PRINT('Exit CONDITION Handler invoked.');\n" + + " INSERT INTO result VALUES('Exit CONDITION Handler invoked.');\n" + "END;\n" + - "DECLARE cnt_condition CONDITION;\n" + - "DECLARE EXIT HANDLER FOR cnt_condition\n" + - " p1();\n" + - "IF 1 <> 2 THEN\n" + - " SIGNAL cnt_condition;\n" + - "END IF;"; - testScriptFile(scriptText, args(), "Exit CONDITION Handler invoked.", OutStream.ERR); + "CREATE PROCEDURE p2()" + + "BEGIN\n" + + " DECLARE exit_condition CONDITION;\n" + + " DECLARE EXIT HANDLER FOR exit_condition\n" + + " p1();\n" + + " SIGNAL exit_condition;\n" + + "END;\n" + + "p2();" + + "SELECT * FROM result;"; + testScriptFile(scriptText, args(), "Exit CONDITION Handler invoked."); Review Comment: sorry I don't get: where do we exactly SELECT from that table? -- 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