- nebula 版本:3.8
- 部署方式: 单机
- 安装方式:源码编译
- 是否上生产环境: N
在一份点有多个tag时,对该点properties()函数,tag间重名属性会被覆盖,无法稳定输出信息。以以下例子为例:
(root@nebula) [push_test]> MATCH(v) RETURN v
+----------------------------------------------------------------------------------------------------------+
| v |
+----------------------------------------------------------------------------------------------------------+
| ("03" :player{age: 23, name: "Tim Duncan1"}) |
| ("05" :player{age: 20, name: "xx"}) |
| ("01" :player{age: 20, name: "aaa"}) |
| ("06" :player{age: 20, name: "zzz"}) |
| ("02" :teacher{course: "math"} :player{age: 22, name: "Tim Duncan"} :killer{age: 30, name: "John Wick"}) |
| ("04" :player{age: 24, name: "Tim Duncan2"}) |
+----------------------------------------------------------------------------------------------------------+
(root@nebula) [push_test]> MATCH ()-[e]-() RETURN e
+--------------------------------------+
| e |
+--------------------------------------+
| [:follow "01"->"02" @0 {degree: 10}] |
| [:follow "01"->"02" @0 {degree: 10}] |
+--------------------------------------+
(root@nebula) [push_test]> MATCH(v) WHERE id(v)=="02" RETURN properties(v)
+-----------------------------------------------+
| properties(v) |
+-----------------------------------------------+
| {age: 22, course: "math", name: "Tim Duncan"} |
+-----------------------------------------------+
(root@nebula) [push_test]> go from "01" over follow YIELD properties($$)
+----------------------------------------------+
| properties($$) |
+----------------------------------------------+
| {age: 30, course: "math", name: "John Wick"} |
+----------------------------------------------+
可以看到,对同一个点"02"通过两种不同方式调用properties()函数
其中player和killer有两个同名的属性name与age,这两个tag的属性一定会被覆盖,并且哪个会被覆盖也不稳定。
请问properties()函数的机制是否需要进行改进?还是说目前就是理想的效果?