go from 中如何返回边类型,type(e) 不能在go from 中用吗?

提问参考模版:

  • nebula 版本:2.0.1
  • 部署方式(分布式 ):
  • 是否为线上版本:Y /
  • 硬件信息
    • 磁盘 ssd ( 推荐使用 SSD)
    • CPU 32c 、内存64 GB
  • 问题的具体描述
    go from 中如何返回边类型,type(e) 不能在go from 中用吗?

可以用._type 获得:

(root@nebula) [nba]> go from "Tim Duncan" over like
+-----------------+
| like._dst       |
+-----------------+
| "Manu Ginobili" |
+-----------------+
| "Tony Parker"   |
+-----------------+
Got 2 rows (time spent 2824/3474 us)

Tue, 13 Jul 2021 13:58:26 CST

(root@nebula) [nba]> go from "Tim Duncan" over like yield like._type
+------------+
| like._type |
+------------+
| 5          |
+------------+
| 5          |
+------------+
Got 2 rows (time spent 1997/2349 us)

Tue, 13 Jul 2021 13:58:29 CST

这边想go from 中获取的是 边的类型名称,不是id,2.0 的show edges 只返回名称了,没id,故无法通过go from 的 边id ,再show edges 关联找名称

用match 语句 type(e) 可以获取名称,但数据量多了直接超时,limit 10 也不行,是不支持limit 下推,这个该怎么处理呀

我用这个 实现了在 go from 语句中
(case Person_friend._type >-1 when true then “Person_friend” ELSE “” end) as edge_name

2 个赞

该话题在最后一个回复创建后30天后自动关闭。不再允许新的回复。