Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Simple GroupBy throws NPE #5236

Open
adamretter opened this issue Feb 28, 2024 · 0 comments
Open

[BUG] Simple GroupBy throws NPE #5236

adamretter opened this issue Feb 28, 2024 · 0 comments
Labels
bug issue confirmed as bug
Milestone

Comments

@adamretter
Copy link
Member

The following query throws a NullPointerException:

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

The stack trace is:

java.lang.NullPointerException: Cannot read field "initialized" because "data" is null
        at org.exist.xquery.GroupByClause.eval(GroupByClause.java:100) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
        at org.exist.xquery.LetExpr.eval(LetExpr.java:110) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
        at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-S
NAPSHOT]
        at org.exist.xquery.PathExpr.eval(PathExpr.java:280) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
        at org.exist.xquery.AbstractExpression.eval(AbstractExpression.java:71) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-S
NAPSHOT]
        at org.exist.xquery.XQuery.execute(XQuery.java:445) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
        at org.exist.xquery.XQuery.execute(XQuery.java:348) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]
        at org.exist.xquery.XQuery.execute(XQuery.java:335) ~[exist-core-7.0.0-SNAPSHOT.jar:7.0.0-SNAPSHOT]

Tested on eXist-db 7.0.0.-SNAPSHOT

@adamretter adamretter added the bug issue confirmed as bug label Feb 28, 2024
@adamretter adamretter added this to the eXist-6.2.1 milestone Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug issue confirmed as bug
Projects
None yet
Development

No branches or pull requests

1 participant