[英]Problems with temporal types like duration in of the wShortest aggregate function
我有 Memgraph v2.0,似乎像持續時間這樣的時間類型不能成為 wShortest 聚合 function 的一部分。這是我的代碼:
MATCH (n) DETACH DELETE n;
CREATE
(storage {name: "storage", current_time: localtime("T11:00")}),
(tape {name: "tape"}),
(lto {name: "lto"}),
(archive1 {name: "archive1", opens: localtime("T10:00"), closes: localtime("T11:00")}),
(archive2 {name: "archive2", opens: localtime("T08:00"), closes: localtime("T10:00")}),
(archive3 {name: "archive3", opens: localtime("T13:00"), closes: localtime("T16:00")}),
(archive4 {name: "archive4", opens: localtime("T15:00"), closes: localtime("T19:00")}),
(storage)-[:Fetch {duration: duration("3H")}]->(tape),
(storage)-[:Fetch {duration: duration("1H")}]->(lto),
(tape)-[:Drive {duration: duration("2H")}]->(archive1),
(tape)-[:Drive {duration: duration("4H")}]->(archive2),
(lto)-[:Ride {duration: duration("5H")}]->(archive3),
(lto)-[:Ride {duration: duration("4H")}]->(archive)
;
這是wShortest
查詢:
MATCH (a {name: "storage"})-[edge_list *wShortest 10 (e, n | e.duration) fetch_time]->(b)
RETURN *;
我得到的錯誤是Error: Query failed: Calculated weight must be numeric, got duration.
這是 Memgraph 2.1.0 版本修復的錯誤。 在變更日志中它說:允許持續時間值用作加權最短路徑查詢中的權重。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.