@@ -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,19 +296,27 @@ public void visit(Modulo expr) {
296296
297297 @ Override
298298 public void visit (AnalyticExpression expr ) {
299- expr .getExpression ().accept (this );
300- expr .getDefaultValue ().accept (this );
301- expr .getOffset ().accept (this );
299+ if (expr .getExpression () != null ) {
300+ expr .getExpression ().accept (this );
301+ }
302+ if (expr .getDefaultValue () != null ) {
303+ expr .getDefaultValue ().accept (this );
304+ }
305+ if (expr .getOffset () != null ) {
306+ expr .getOffset ().accept (this );
307+ }
302308 if (expr .getKeep () != null ) {
303309 expr .getKeep ().accept (this );
304310 }
305311 for (OrderByElement element : expr .getOrderByElements ()) {
306312 element .getExpression ().accept (this );
307313 }
308314
309- expr .getWindowElement ().getRange ().getStart ().getExpression ().accept (this );
310- expr .getWindowElement ().getRange ().getEnd ().getExpression ().accept (this );
311- expr .getWindowElement ().getOffset ().getExpression ().accept (this );
315+ if (expr .getWindowElement () != null ) {
316+ expr .getWindowElement ().getRange ().getStart ().getExpression ().accept (this );
317+ expr .getWindowElement ().getRange ().getEnd ().getExpression ().accept (this );
318+ expr .getWindowElement ().getOffset ().getExpression ().accept (this );
319+ }
312320 }
313321
314322 @ Override
0 commit comments