ramitg254 commented on code in PR #6959:
URL: https://github.com/apache/hive/pull/6959#discussion_r4625912640
##########
beeline/src/test/org/apache/hive/beeline/TestCommands.java:
##########
@@ -376,5 +383,51 @@ public void testGetCmdList() throws Exception {
beeline.close();
}
}
+
+ @Test
+ public void testSourceFileDelimiterInQuery() throws Exception {
+ List<String> statements = Arrays.asList(
+ "select 'foo;bar' as s",
+ "select current_database() as db",
+ "select 1 as ok",
+ "select 2 as also_ok",
+ "select 1 as a",
+ "select /* part; two */ 2 as b");
+ assertEquals(statements, sourceScript(toScript(statements)));
+
+ assertEquals(Collections.emptyList(), sourceScript(""));
+ assertEquals(Collections.emptyList(),
+ sourceScript("-- only a comment; with semicolon\n# shell; comment\n"));
+
+ assertEquals(Arrays.asList("select 1"),
+ sourceScript("select 1; -- note; more\nselect 2;\n"));
Review Comment:
sorry,` \n` got missed from me in that string while made that change with
AI, as it altered the expected output accordingly as well in the change 😔.
thanks for pointing it out, corrected the fix and test as well
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]