Hi,The title says it all, I was curious about why edge properties can't be sets or lists?
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/d10f05e9-cb20-419e-8c9b-c598b012f1f8%40googlegroups.com.
That asymmetry in the API was the subject of intense discussion in the early days of TinkerPop 3.x. I'm sorry I can't recall the details of the discussion really to give the highlights, but I feel like the general consensus was that the use cases we had envisioned given the best practices for schema design we'd espoused largely left us with the position that multiproperties would most typically be defined on vertices and not so much on edges. From my current perspective, I don't think we should have ever made multi or metaproperties first class citizens in TinkerPop at all. They should have simply been features of the underlying graphs system and Gremlin should have just been flexible enough to query them nicely however the graph system implemented them.
On Mon, Nov 18, 2019 at 8:09 AM Kushal Agrawal <sweaty...@gmail.com> wrote:
--Hi,The title says it all, I was curious about why edge properties can't be sets or lists?
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/afca19e0-3fa9-486a-a975-d824d16cd679%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CAA-H439_S6pWRk%3DvgxoPEmKpZFXuoJkPEcyLNitmk0P7nBtmDg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/CAPc0OuuChQAL8T6WsdteUseyRm5W76f0C3ZHpajcDzotu%2BYJWQ%40mail.gmail.com.
FWIW I think we should probably extend support for set-valued properties into TP4, and if so, you should be able to have set-valued properties on both edges and vertices, depending on whether the underlying graph supports them. Formally, it is probably best to think of sets as lists for which we just don't care about the order. Setting a set-valued property means replacing the set value with another set value.Note: I do not see set-valued properties and multi-properties as the same beast. A set-valued property, a or a list- or map-valued property, is a property whose value is a collection. Supporting collection-valued properties does not require relaxing the constraint that the keys of an element's properties are distinct. Multi-properties do require relaxing that constraint (and I think in general this feature should be available, though many implementations may choose not to support it). The distinction becomes important if meta-properties are also supported, as the elements of a set of property values cannot be annotated with individual meta-properties, whereas a set of multi-properties can.Josh
On Tue, Nov 19, 2019 at 2:33 AM Stephen Mallette <spmal...@gmail.com> wrote:
> Since it's not a settled issue, is there an ongoing discussion around the matter? Is it possible that multi-properties will stop being first class citizens in vertices as well?I mean...I think the way multi/metaproperties currently work is a settled issue for TinkerPop 3.x. I don't think 3.x could take the structural upheaval involved in changing this (one way or the other) unless someone came up with something really clever or the demand massively overwhelming. So, I'd say the feature is safe for 3.x, however support among graph systems is spotty and you reduce the portability of your code by using them I'd say.> As a side note, I wanted to ask what the point of cardinality is, given that the value of a property can be any arbitrary Java object? Is it to support indexing on the members of a set or list?The feature roots out of Titan (JanusGraph) with the idea that Gremlin would have knowledge of the notion that properties could contain lists or metadata and could therefore be traversed seamlessly and with graph provider optimization (indices). In TinkerPop 2.x we didn't have flexibility in the language to express such things well so we felt we needed to make these features structurally explicit which then made it pretty easy to make Gremlin utilize that structure. While a property can take an arbitrary object there needs to be a way for the graph to know what that object represents:g.V()......property('color',['red'])Does that mean to append "red" to a list as a multiproperty or to append a List with the string "red" in it as a multiproperty or does it just mean overwrite the "color" property with a List? in TinkerPop 3.x the Cardinality argument would make that option clear. Not sure how such things would be delegated to the underlying graph without Cardinality...perhaps a schema would help make that decision clear. That will need more thought.
On Tue, Nov 19, 2019 at 1:43 AM Kushal Agrawal <sweaty...@gmail.com> wrote:
P.S. Apologies for any confusion stemming from the error in the title, I meant to say cardinality, not multiplicity.--
On Monday, 18 November 2019 18:39:38 UTC+5:30, Kushal Agrawal wrote:Hi,The title says it all, I was curious about why edge properties can't be sets or lists?
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/afca19e0-3fa9-486a-a975-d824d16cd679%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremli...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/713fae8b-63b3-4cf2-86c2-85f832fbd658n%40googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/da943583-fdda-49ee-a589-c26b6dc2d146n%40googlegroups.com.