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

SQL warnings "null value eliminated in set function" (code -1003, state 01003) #88

Closed
raphj opened this issue Jan 16, 2024 · 0 comments
Closed
Assignees
Milestone

Comments

@raphj
Copy link

raphj commented Jan 16, 2024

When saving a document that contains new tasks, we sometimes get such warnings in the log (I use hqldb):

2024-01-16 11:46:42,502 [qtp952562199-1837 - http://localhost:8090/xwiki/bin/preview/Main/WebHome] WARN  o.h.e.j.s.SqlExceptionHelper   - SQL Warning Code: -1003, SQLState: 01003 
2024-01-16 11:46:42,502 [qtp952562199-1837 - http://localhost:8090/xwiki/bin/preview/Main/WebHome] WARN  o.h.e.j.s.SqlExceptionHelper   - warning: null value eliminated in set function 

Apparently this is a warning mandated by the SQL standard. (via https://stackoverflow.com/questions/18719436/getting-warning-null-value-is-eliminated-by-an-aggregate-or-other-set-operation/18719852#18719852)

This comes from query select max(taskObject.number) from Document doc, doc.object(TaskManager.TaskManagerClass) as taskObject, this seem to be because some taskObject.number fields are null when the query runs.

Adding where taskObject.number is not null fixes the issue.

@raphj raphj self-assigned this Jan 16, 2024
@raphj raphj added this to the 3.3.1 milestone Jan 16, 2024
@raphj raphj closed this as completed Jan 16, 2024
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

No branches or pull requests

1 participant