nice to hear that folks are still thinking about how GraphAR and TinkerPop
can work together.

>  Can we understand that it means that one key corresponds to multiple
values, which needs to be represented by a list?

yes, a multi-property is a bit like storing the values in a list for a
single key, but a multi-property has some particularities to it:

gremlin> g.addV().property('name',['alice','bob'])
==>v[0]
gremlin> g.addV().property(list,'name','craig').property(list,'name','dave')
==>v[2]
gremlin> g.V(0l).properties()
==>vp[name->[alice, bob]]
gremlin> g.V(2l).properties()
==>vp[name->craig]
==>vp[name->dave]

in the above example, the 0 vertex stores a alice and bob as a list while
the 2 vertex stores craig and dave as a multi-property. you can see that
TinkerPop treats the latter as two separate properties which leads to other
differences:

gremlin> g.V().has('name','alice')
gremlin> g.V().has('name','dave')
==>v[2]

In the previous example, alice can't be found because "name" has a List
object to match on for vertex 0. But we can find dave because vertex 2 used
a multi-property which stores it as a string on a individual property.

This may all be Gremlin semantics that i'm describing and might not have
any impact on how you choose to implement the ability to model
"multi-properties" for GraphAR, but I thought i'd clarify their behavior a
bit in case that helped.


On Wed, Nov 20, 2024 at 3:01 AM Haoyu Liu <hyliu2...@qq.com.invalid> wrote:

> Hi,Stephen
> In order to better integrate with Gremlin, we have now implemented
> GraphAr's support for multi-label data, that is, a vertex can have multiple
> labels: https://github.com/apache/incubator-graphar/issues/614.&nbsp;
> The example is at
> https://github.com/apache/incubator-graphar/blob/main/docs/libraries/cpp/getting-started.md#processing-graph-data-with-labels
> .
> For 'multiproperties that are themselves of List type', Can we understand
> that it means that one key corresponds to multiple values, which needs to
> be represented by a list? We will raise an issue in the near future to make
> corresponding modifications.
> Regards,
> Haoyu Liu
>
>
> On 2024/05/27 02:19:55 "李雪(有理)" wrote:
> &gt; Sorry for the late reply; TinkerPop would need to rewrite their
> input/output modules to adapt to GraphAr's APIs, similar to what we have
> done with GraphScope:
> https://github.com/v6d-io/v6d/commit/0eda2067e45fbb4ac46892398af0edc84fe1c27b
> <
> https://github.com/v6d-io/v6d/commit/0eda2067e45fbb4ac46892398af0edc84fe1c27b
> &gt;.&nbsp;
> &gt; In GraphAr, regarding handling multiple properties, employing a List
> is deemed practical. To differentiate these from properties that are
> inherently List-typed, it is advisable to either prepend a prefix to the
> property name or to leverage extra information (
> https://github.com/apache/incubator-graphar/blob/main/cpp/include/graphar/graph_info.h#L706
> <
> https://github.com/apache/incubator-graphar/blob/main/cpp/include/graphar/graph_info.h#L706
> &gt;) contained within the GraphAr's meta-info YAML.&nbsp;
> &gt; Alternatively, one could define each property separately and store
> them individually, taking advantage of the fact that null values are
> permissible.
> &gt; ------------------------------------------------------------------
> &gt; 发件人:Stephen Mallette <sp...@gmail.com&gt;
> &gt; 发送时间:2024年5月24日(星期五) 19:28
> &gt; 收件人:dev<de...@graphar.apache.org&gt;
> &gt; 主 题:Re: Apache TinkerPop and GraphAr
> &gt; Could you please share what you think are the main changes you would
> think
> &gt; TinkerPop would have to make?
> &gt; I also wonder a bit about multi/meta-properties and how they might
> fit into
> &gt; the future of GraphAr. I don't find that a lack of support for either
> &gt; multi/metaproperties is a huge blocker for adoption but i don't see
> those
> &gt; things going away i the long term. I suppose multiproperties could be
> &gt; coerced to List but I suppose that would preclude use of
> &gt; multiproperties that are themselves of List type.
> &gt; On Thu, May 23, 2024 at 9:28 PM 李雪(有理) <yo...@alibaba-inc.com.invalid
> &gt;
> &gt; wrote:
> &gt; &gt; Your understanding is accurate. Our integration strategy with
> Neo4j has
> &gt; &gt; been designed to be non-intrusive.
> &gt; &gt; For deeper integration, we have initiated efforts to adopt
> GraphAr as the
> &gt; &gt; primary format for importing and exporting in GraphScope, which
> has led to
> &gt; &gt; considerable performance improvements. You can find more details
> here:
> &gt; &gt;
> https://graphar.apache.org/docs/libraries/cpp/examples/graphscope <
> https://graphar.apache.org/docs/libraries/cpp/examples/graphscope &gt; <
> &gt; &gt;
> https://graphar.apache.org/docs/libraries/cpp/examples/graphscope <
> https://graphar.apache.org/docs/libraries/cpp/examples/graphscope &gt;
> &gt;
> &gt; &gt; Furthermore, we have explored mechanisms to support certain
> pushdown
> &gt; &gt; operations tailored for graph querying scenarios, which reduces
> the
> &gt; &gt; necessity of loading the entire graph into memory. However,
> these features
> &gt; &gt; are still in the experimental phase and have not yet been
> incorporated into
> &gt; &gt; our main branch.
> &gt; &gt; As for integrating GraphAr with TinkerPop for OLAP use cases, my
> main
> &gt; &gt; concern is the potential impact on the execution engine. Such
> integration
> &gt; &gt; may require notable changes of the TinkerPop codebase, according
> to our
> &gt; &gt; experience with GraphScope.
> &gt; &gt; Despite these challenges, we are enthusiastic about engaging
> with the
> &gt; &gt; TinkerPop community. We would like to provide the necessary
> functionalities
> &gt; &gt; and any assistance regarding GraphAr support.
> &gt; &gt;
> ------------------------------------------------------------------
> &gt; &gt; 发件人:Stephen Mallette <sp...@gmail.com&gt;
> &gt; &gt; 发送时间:2024年5月23日(星期四) 19:15
> &gt; &gt; 收件人:dev<de...@graphar.apache.org&gt;
> &gt; &gt; 主 题:Re: Apache TinkerPop and GraphAr
> &gt; &gt; From what I understand from your documentation, it looks as
> though you
> &gt; &gt; provide ways to directly connect to Neo4j through a spark job. I
> assume
> &gt; &gt; there might be something similar you could do with Gremlin
> Server. That
> &gt; &gt; might be nice. In that way, users could convert any TinkerPop
> graph to
> &gt; &gt; GraphAr format.
> &gt; &gt; I suppose my main question though is whether or not it would be
> a good idea
> &gt; &gt; for TinkerPop to use GraphAr more directly as an input/output
> format for
> &gt; &gt; OLAP use cases? TinkerPop currently prefers use of Gryo, it's
> own format
> &gt; &gt; based on Kryo, but I feel like GraphAr could be a better choice
> going
> &gt; &gt; forward potentially. I'd be interested to hear what GraphAr
> experts think
> &gt; &gt; about this use case.
> &gt; &gt; On Tue, May 21, 2024 at 9:20 PM 李雪(有理)
> <yo...@alibaba-inc.com.invalid&gt;
> &gt; &gt; wrote:
> &gt; &gt; &gt; Hello, Stephen
> &gt; &gt; &gt; Thank you for bringing up this interesting discussion
> point. As far as I
> &gt; &gt; &gt; am aware, there have not been any formal discussions
> regarding a direct
> &gt; &gt; &gt; collaboration between TinkerPop and GraphAr to this date.
> However, I
> &gt; &gt; &gt; believe a collaborative effort in this area could lead to
> improvements in
> &gt; &gt; &gt; how graph data is managed and processed.
> &gt; &gt; &gt; Drawing from our experiences with integrating Neo4j and
> NebulaGraph, we
> &gt; &gt; &gt; have gleaned insights that could prove invaluable in this
> context.
> &gt; &gt; &gt; We are keenly interested in delving deeper into this
> conversation between
> &gt; &gt; &gt; TinkerPop and GraphAr.
> &gt; &gt; &gt;
> ------------------------------------------------------------------
> &gt; &gt; &gt; 发件人:Stephen Mallette <sp...@gmail.com&gt;
> &gt; &gt; &gt; 发送时间:2024年5月21日(星期二) 21:02
> &gt; &gt; &gt; 收件人:dev<de...@graphar.apache.org&gt;
> &gt; &gt; &gt; 主 题:Apache TinkerPop and GraphAr
> &gt; &gt; &gt; Hello - I was just wondering if there have been any
> discussions about how
> &gt; &gt; &gt; TinkerPop and GraphAr might work together a bit.
> TinkerPop's file system
> &gt; &gt; &gt; formats have grown a bit dated to some degree and GraphAr
> seems like it
> &gt; &gt; &gt; could be useful there as a replacement to internal formats,
> particularly
> &gt; &gt; &gt; Gryo. Looking forward to hearing thoughts on this topic.
> Thanks!
> &gt; &gt; &gt; Stephen
> &gt; &gt; &gt;
> &gt; &gt;
> &gt;

Reply via email to