-
Notifications
You must be signed in to change notification settings - Fork 426
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
Usage of containment op instead of equal in property constraints (for lists and maps) #1461
Comments
Hi guys, I have a question on this issue. For list as property, I was able to cross check the output using neo4j. But neo4j doesnt allow map as a property in an entity, so I wasn't able to check the expected behavior for that scenario. So I wanted to know what should we do in this case. The scenario is explained in the example below.
Currently it does not perform equality check on the value if it is a map, rather performs a containment check.
Should it be what it is currently? or like lists, it should do an equality check on property.school i.e
|
@MuhammadTahaNaveed I feel like this could be argued either way, if I understand the question. When someone is looking for, SELECT or MATCH, they're asking if something has this something. It could be, does it have it or does it equal it. But, it ends up being a bit ambiguous as to what is wanted. Maybe we should have a default behavior, say contains, and an operator to modify that behavior? For example, Contains as default, equals when specified -
Equals as default, contains when specified -
I say a default contains because it feels like when doing a SELECT or MATCH you are asking for all occurrences and then, by using qualifiers, you are narrowing the results down. Just my thoughts |
Sounds good to me. Just to clarify though, this should be for both lists and maps occurring as property values or just maps?
Now the query below returning the row(by default) makes sense to me, keeping in mind
What do you think? |
@MuhammadTahaNaveed We definitely need to discuss this because lists and maps can be embedded in each other. It would seem to be best to apply the same logic to both. |
I agree that it should apply to both nested maps and lists. |
@MuhammadTahaNaveed Can we close this issue? |
@jrgemignani This issue was resolved in #1516. I am going ahead with closing this issue. |
Usage of containment op instead of equal in property constraints (for lists and maps) outputs different results as compared to neo4j. Is this intentional?
Data:
Query with issue:
Results
Neo4j:
Age:
The text was updated successfully, but these errors were encountered: