Skip to content

[Fix] #2443 - NPE In TableNamesFinder with AnalyticExpression#2444

Merged
manticore-projects merged 2 commits into
JSQLParser:masterfrom
davyboyhayes:2443
Jul 25, 2026
Merged

[Fix] #2443 - NPE In TableNamesFinder with AnalyticExpression#2444
manticore-projects merged 2 commits into
JSQLParser:masterfrom
davyboyhayes:2443

Conversation

@davyboyhayes

@davyboyhayes davyboyhayes commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

If you attempt to tree walk an AnalyticExpression in TableNamesFinder with an SQL that has a window function without a range and without an offset, such as SELECT c, SUM(COUNT(*)) OVER (ORDER BY c ASC ROWS UNBOUNDED PRECEDING) FROM tbl GROUP BY c, an NPE is thrown. This adds defensive checks around the range and offset expressions being null.

Fixes #2443

David Hayes added 2 commits July 24, 2026 13:06
If you attempt to tree walk an AnalyticExpression in TableNamesFinder with an SQL that has a window function without a range and without an offset, such as `SELECT c, SUM(COUNT(*)) OVER (ORDER BY c ASC ROWS UNBOUNDED PRECEDING) FROM tbl GROUP BY c`, an NPE is thrown. This adds defensive checks around the range and offset expressions being null.
@manticore-projects

Copy link
Copy Markdown
Contributor

Thank you!

@manticore-projects
manticore-projects merged commit 5646842 into JSQLParser:master Jul 25, 2026
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] NPE in TableNamesFinder in AnalyticExpression visitor

2 participants