update set中使用json_extract报错

内核版本:3.4.1

使用的修改语句是:
UPDATE EDGE ON peer ‘4649420915237453888’->‘1085252023860989952’ set modify_time = datetime(), weight = weight - json_extract(props)[“t20230317”] + 8,
props = replace(props,‘“t20230317”:2’,‘“t20230317”:8’)
WHEN “t20230317” in json_extract(props);

报错日志是:
-1009:SemanticError: Has wrong expr in `((weight-json_extract(props)[“t20230317”])+8)’

原数据内容是:
[:peer “4649420915237453888”->“1085252023860989952” @0 {create_time: 2023-03-27T12:20:20.032000, modify_time: 2023-03-27T12:30:43.747000, props: “{“t20230316”:1,“t20230317”:2}”, rel_type: “peer”, source_aid: “1085252023860989952”, source_data_type: “PERSON”, target_aid: “4649420915237453888”, target_data_type: “PERSON”, weight: 3.0}]

json_extract数据查询nGQL成功
nGQL:
FETCH PROP ON peer ‘4649420915237453888’->‘1085252023860989952’ YIELD json_extract(properties(edge).props)[“t20230317”] as tmp

结果:

请问如何让实现update set中使用json_extract的功能?或者换个方式也可以,尝试了查询后用管道再update一样不行?这点就比arangodb与neo4j不行。

版本号
3.4.1

提了个 issue,应该是 bug,后面安排 fix。

fix 的 PR 已经合入

2 个赞