RETURN propertyTypes(n) feature + fast retrieval of property types of an entity from property manager - #519
RETURN propertyTypes(n) feature + fast retrieval of property types of an entity from property manager#519LucLabarriere wants to merge 12 commits into
Conversation
dbb3d4d to
cd6a702
Compare
|
Also any thoughts on how this would work w.r.t SET? |
That's a good question, I would say:
For deletions, we will have to have some sort of tombstones on property types, our delete the node itself ? |
0042e00 to
8cf6250
Compare
| class PropertyTypesFunction { | ||
| public: | ||
| using ResultType = std::string; | ||
| std::unordered_set<PropertyTypeID> _seen; |
There was a problem hiding this comment.
Why do we need to even deduplicate with an unordered_set here? Why can't we just give the property types of each NodeID regardless of repetitions?
There was a problem hiding this comment.
This is mostly for the SET command and it depends how it will be implemented. If we just append modifications in newer dataparts, a node will have multiple definitions of the property and the property type ID will appear multiple times.
SET n.displayName = "hello"
COMMIT
SET n.displayName = "world"
displayName is defined twice (in two dataparts), hence the need to deduplicate. That will depend on the actual implementation of SET
8a3d5a8 to
91dce0e
Compare
…ild time to generate deduplicated PropertyTypeSets
… list of property types an entity has
…ze cache accesses
91dce0e to
dd9468f
Compare
|
Looks nice, I think it works well with the current SET implementation, currently you can't delete properties anyway, so whilst it might need a rethink to support that, so will the SET itself. It is worth adding a unit test for testing the rebase behaviour. I have tested the below manually and it appears to work: i.e. both changes create a new property, and they should be rebased correctly so that Remy has new_prop2 and I have new_prop1. We need this case and other similar examples in ChangeQueriesTest. |
MATCH (n) RETURN propertyTypes(n)on reactome: 400 msMATCH (n)-[e]->(m) RETURN propertyTypes(e): 508 ms