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

nullpointerexception on unconventional query #100

Open
christopheleroy opened this issue Nov 22, 2018 · 1 comment
Open

nullpointerexception on unconventional query #100

christopheleroy opened this issue Nov 22, 2018 · 1 comment

Comments

@christopheleroy
Copy link

On a big SELECT /union/ SELECT / union ... query, which the parser declares is unparseable (but works when executing "plain vanilla"), the query cannot be executed because I get:

java.lang.NullPointerException
at com.novartis.opensource.yada.QueryManager.prepQueryForExecution(QueryManager.java:702)
at com.novartis.opensource.yada.QueryManager.prepQueriesForExecution(QueryManager.java:857)
at com.novartis.opensource.yada.QueryManager.processRequest(QueryManager.java:189)
at com.novartis.opensource.yada.QueryManager.(QueryManager.java:137)
at com.novartis.opensource.yada.Service.execute(Service.java:595)

QueryManager - line 702 is doing a:

yq.getType().equals(...)

yq.getTypes() returns null, because yq.type has not been set.

yq.type should probably default to some "UNDERTMINED" value that does not fail its '.equas()'
or perhaps yq.getTypes() should never return null....

@christopheleroy
Copy link
Author

everything works again when I surround my query with SELECT * FROM ( the original big union query)
etc.

It would be really nice to upgrade the parser (it fails with 8.6.1. because there is a lot of postgres peculiarities) but a NullPointerException should never happen in QueryManager etc.

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