File tree Expand file tree Collapse file tree
main/java/net/sf/jsqlparser/expression
test/java/net/sf/jsqlparser/expression Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ public void visit(SubSelect subSelect) {
227227
228228 @ Override
229229 public void visit (CaseExpression expr ) {
230- if (expr .getSwitchExpression ()!= null ) {
230+ if (expr .getSwitchExpression () != null ) {
231231 expr .getSwitchExpression ().accept (this );
232232 }
233233 for (Expression x : expr .getWhenClauses ()) {
@@ -296,7 +296,9 @@ public void visit(Modulo expr) {
296296
297297 @ Override
298298 public void visit (AnalyticExpression expr ) {
299- expr .getExpression ().accept (this );
299+ if (expr .getExpression () != null ) {
300+ expr .getExpression ().accept (this );
301+ }
300302 expr .getDefaultValue ().accept (this );
301303 expr .getOffset ().accept (this );
302304 if (expr .getKeep () != null ) {
Original file line number Diff line number Diff line change @@ -209,5 +209,12 @@ public void testCaseWithoutElse3() throws JSQLParserException {
209209 ExpressionVisitorAdapter adapter = new ExpressionVisitorAdapter ();
210210 expr .accept (adapter );
211211 }
212+
213+ @ Test
214+ public void testAnalyticFunctionWithoutExpression502 () throws JSQLParserException {
215+ Expression expr = CCJSqlParserUtil .parseExpression ("row_number() over (order by c)" );
216+ ExpressionVisitorAdapter adapter = new ExpressionVisitorAdapter ();
217+ expr .accept (adapter );
218+ }
212219
213220}
You can’t perform that action at this time.
0 commit comments