Skip to content

[7.x.x] Fix NPE in group by after let - #251

Open
Laurettta wants to merge 1 commit into
develop-7.x.xfrom
7.x.x/hotfix/group-by-npe
Open

Laurettta wants to merge 1 commit into
develop-7.x.xfrom
7.x.x/hotfix/group-by-npe

Conversation

@Laurettta

@Laurettta Laurettta commented Nov 17, 2026 •

Copy link
Copy Markdown

LetExpr now calls preEval on the next clause, like ForExpr does, so group by after let no longer throws an NPE.

Closes eXist-db/exist#5236

@cla-bot cla-bot Bot added the cla-signed label Nov 17, 2026
@codacy-production

Copy link
Copy Markdown

Not up to standards ⛔

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@Laurettta
Laurettta force-pushed the 7.x.x/hotfix/group-by-npe branch from 52a9a0f to 1472341 Compare November 17, 2026 10:20
@marmoure

Copy link
Copy Markdown
Contributor

@Laurettta Although this change does stop the NPE but the result is not what we expected, the expected output of

let $x := (10, 20, 30)
group by $y := $x < 30
return
  $x

Is

10
20
30

Convert this PR into a draft and see if you can fix the implementation.

@Laurettta
Laurettta marked this pull request as draft November 17, 2026 13:29
@Laurettta

Copy link
Copy Markdown
Author

Thanks @marmoure, I have converted it to a draft and I will work on getting the expected 10 20 30.

@Laurettta
Laurettta force-pushed the 7.x.x/hotfix/group-by-npe branch from 1472341 to 89bbccc Compare November 17, 2026 15:10
@Laurettta

Laurettta commented Nov 17, 2026 •

Copy link
Copy Markdown
Author

@marmoure I have pushed a fix. The query now returns 10 20 30 (checked in eXide).

@Laurettta
Laurettta marked this pull request as ready for review November 17, 2026 15:31
@Laurettta
Laurettta requested a review from adamretter November 18, 2026 09:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants