-
Notifications
You must be signed in to change notification settings - Fork 165
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
Regression: Queries with HAVING clause throw AssertionError in Var because parent is already set #4157
Comments
Thanks for finding this. It might not be a bug per se. I added the assertions to help detect reused Var objects since this has been the root cause of some bugs that were particularly hard to debug. |
Maybe it's not a bug, but it makes it unusable for us. Or we need to disable assertions, which might also be an option, but that requirs and extra configuration step and will need to be done by anybody using HAVING clauses with 4.1.1... Ideally we'd have a 4.1.2 soon which avoids triggering this assert. Any chance for that? We have a release of our software planned for end of this month, so getting an update a bit before then would be great! |
I'll see what I can do :) In the mean time you should be able to disable just that assertion without affecting other assertions. https://stackoverflow.com/questions/28901375/how-do-i-disable-java-assertions-for-a-junit-test-in-the-code Assertions aren't enabled by default in java, so if your product is a standalone application then it shouldn't be affected I would hope. |
@jetztgradnet Could you take a look at my PR? |
@hmottestad That was quick! I will have a look together with @aschwarte10. |
Quick feedback regarding disabling asserts: adding this to my unit tests makes them pass again:
I will now test this PR (building it locally and replacing some of my jars) |
GH-4157 Fix for assertion error due to Var not being cloned
With 4.1.2 this is fixed now. |
Current Behavior
When parsing the following query with RDF4J 4.1.1 (worked with 4.1.0 and 4.0.0) I get an AssertionError:
Removing the
HAVING
clauses makes it parse, so the issue must be somewhere in there. I assume one of the recent optimizations are missing one of the Expr.clone() calls or so?Stacktrace:
Expected Behavior
The query can be parsed without errors.
Steps To Reproduce
This unit test reproduces the behavior:
Removing the
HAVING
clauses makes it pass, so the issue must be somewhere in there.Version
4.1.1
Are you interested in contributing a solution yourself?
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: