File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
main/java/net/sf/jsqlparser/expression
test/java/net/sf/jsqlparser/expression Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,7 @@ public void visit(SubSelect subSelect) {
227
227
228
228
@ Override
229
229
public void visit (CaseExpression expr ) {
230
- if (expr .getSwitchExpression ()!= null ) {
230
+ if (expr .getSwitchExpression () != null ) {
231
231
expr .getSwitchExpression ().accept (this );
232
232
}
233
233
for (Expression x : expr .getWhenClauses ()) {
@@ -296,7 +296,9 @@ public void visit(Modulo expr) {
296
296
297
297
@ Override
298
298
public void visit (AnalyticExpression expr ) {
299
- expr .getExpression ().accept (this );
299
+ if (expr .getExpression () != null ) {
300
+ expr .getExpression ().accept (this );
301
+ }
300
302
expr .getDefaultValue ().accept (this );
301
303
expr .getOffset ().accept (this );
302
304
if (expr .getKeep () != null ) {
Original file line number Diff line number Diff line change @@ -209,5 +209,12 @@ public void testCaseWithoutElse3() throws JSQLParserException {
209
209
ExpressionVisitorAdapter adapter = new ExpressionVisitorAdapter ();
210
210
expr .accept (adapter );
211
211
}
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
+ }
212
219
213
220
}
You can’t perform that action at this time.
0 commit comments