alibaba / GraphScope

🔨 🍇 💻 🚀 GraphScope: A One-Stop Large-Scale Graph Computing System from Alibaba | 一站式图计算系统
https://graphscope.io
Apache License 2.0
3.2k stars 431 forks source link

[BUG] g.graphlearn()/g.gremlin() should check if the type is compatible first #1509

Open sighingnow opened 2 years ago

sighingnow commented 2 years ago

Describe the bug

GraphLearn has implies int64_t as OID_T (see types.h) and current gremlin engine doesn't support string oids as well (see https://github.com/alibaba/GraphScope/issues/1265).

An exceptions should be thrown in g.graphlearn()/g.gremlin() is the oid type of vineyard graph is not compatible with those two engines.

sighingnow commented 2 years ago

I'm also not sure if we will support string as oids in above engines in the future.

lidongze0629 commented 2 years ago

sess.gremlin failed with string oid

WARNING: Logging before InitGoogleLogging() is written to STDERR
I0519 01:01:55.693738 61686 htap_ds_impl.cc:35] Initialize vineyard client
I0519 01:01:55.784637 61686 htap_ds_impl.cc:39] Get vineyard object ok: 0x565099020260
I0519 01:01:55.784672 61686 htap_ds_impl.cc:43] FragGroup: total frag num = 2, vertex label num = 8, edge label num = 11
I0519 01:01:55.785598 61686 htap_ds_impl.cc:82] fid = 0, instance_id = 0, location = 0
[error] Assertion failed in "meta.GetTypeName() == __type_name": , in function void vineyard::ArrowFragment<OID_T, VID_T>::Construct(const vineyard::ObjectMeta&) [with OID_T = long int; VID_T = long unsigned int], file /usr/local/lib/cmake/vineyard/../../../include/vineyard/graph/fragment/arrow_fragment.vineyard.h, line 136Expect typename 'vineyard::ArrowFragment<int64,uint64>', but got 'vineyard::ArrowFragment<std::string,uint64>'
fatal runtime error: Rust cannot catch foreign exceptions