-
Notifications
You must be signed in to change notification settings - Fork 871
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
COUNT return nothing when no line match the criteria #8280
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
OrientDB Version: 3.0.1, 3.0.0RC2
Java Version: 1.8.0_162
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
OS: MacOSX 10.13.4
Expected behavior
When counting elements of a class with a restriction
I expect to get a single result with the count value event if no foo object has the name 'bar'.
In this case, the value of count should be 0.
Actual behavior
When the restriction is empty, count has no result at all.
Note, when there is no restriction but the class is empty, the query bahave has expected.
Note: the problem seams to come from a premature optimisation of the query plan that dump the result when the restriction is empty.
Steps to reproduce
Here is a scenario from the console 3.0.1. The same behavior happens in the java driver.
The last command should return an item with 0.
The text was updated successfully, but these errors were encountered: