Skip to content

Commit 173a25f

Browse files
test: add an issue related unit test
Signed-off-by: Andreas Reichel <[email protected]>
1 parent 95ebda5 commit 173a25f

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/test/java/net/sf/jsqlparser/expression/FunctionTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,4 +119,11 @@ void testListAggOnOverflow(String sqlStr) throws Exception {
119119
void testTrimFunctions(String sqlStr) throws JSQLParserException {
120120
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
121121
}
122+
123+
@Test
124+
void TestIntervalParameterIssue2272() throws JSQLParserException {
125+
String sqlStr =
126+
"SELECT DATE_SUB('2025-06-19', INTERVAL QUARTER(STR_TO_DATE('20250619', '%Y%m%d')) - 1 QUARTER) from dual";
127+
TestUtils.assertSqlCanBeParsedAndDeparsed(sqlStr, true);
128+
}
122129
}

0 commit comments

Comments
 (0)