Skip to content

Commit 10a69a2

Browse files
committed
1 parent d928268 commit 10a69a2

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/test/java/net/sf/jsqlparser/statement/select/SelectTest.java

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2757,6 +2757,16 @@ public void testSelectOracleColl() throws JSQLParserException {
27572757
public void testSelectInnerWith() throws JSQLParserException {
27582758
assertSqlCanBeParsedAndDeparsed("SELECT * FROM (WITH actor AS (SELECT 'a' aid FROM DUAL) SELECT aid FROM actor)");
27592759
}
2760+
2761+
@Test
2762+
public void testSelectInnerWithAndUnionIssue1084() throws JSQLParserException {
2763+
assertSqlCanBeParsedAndDeparsed("WITH actor AS (SELECT 'b' aid FROM DUAL) SELECT aid FROM actor UNION WITH actor2 AS (SELECT 'a' aid FROM DUAL) SELECT aid FROM actor2");
2764+
}
2765+
2766+
@Test
2767+
public void testSelectInnerWithAndUnionIssue1084_2() throws JSQLParserException {
2768+
assertSqlCanBeParsedAndDeparsed("WITH actor AS (SELECT 'b' aid FROM DUAL) SELECT aid FROM actor UNION SELECT aid FROM actor2");
2769+
}
27602770

27612771
@Test
27622772
public void testSelectWithinGroup() throws JSQLParserException {
@@ -4361,4 +4371,9 @@ public void testExistsKeywordIssue1076_1() throws JSQLParserException {
43614371
public void testFormatKeywordIssue1078() throws JSQLParserException {
43624372
assertSqlCanBeParsedAndDeparsed("SELECT FORMAT(date, 'yyyy-MM') AS year_month FROM mine_table");
43634373
}
4374+
4375+
@Test
4376+
public void testConditionalParametersForFunctions() throws JSQLParserException {
4377+
assertSqlCanBeParsedAndDeparsed("SELECT myFunc(SELECT mycol FROM mytable)");
4378+
}
43644379
}

0 commit comments

Comments
 (0)