nebula3.6.0版本go语句多步查询filter下推问题

请问为啥多步(steps>1)查询时候filter就没有下推了呢,单步查询的时候正确下推了
查询语句如下

# 单步查询
go 1  steps from "c3e4801febf063d976369521418e7d12" over transfer bidirect where (case transfer._type>0 when true then transfer.send_amt>=$^.top100.`out` else transfer.recv_amt>=$^.top100.`in` end) yield id($^) as src, id($$) as dst;
# 多步查询
go 1 to 2 steps from "c3e4801febf063d976369521418e7d12" over transfer bidirect where (case transfer._type>0 when true then transfer.send_amt>=$^.top100.`out` else transfer.recv_amt>=$^.top100.`in` end) yield id($^) as src, id($$) as dst;

执行计划截图如下

go 多步的语义是 先按照用户指定的步数拓展,拓展完成之后对最终的结果 进行过滤,所以filter 不能下推到storage层, 可以参考

2 个赞

@jmq2020 感谢回复,我另外还有一个关于计算下推的问题,在go语句中引用边的方向做计算是可以下推的(例如我上面截图中使用的 case(transfer._type>0) when true then ... else ... end ),但是同样的写法在match语句中无法下推,请问有什么办法可以在match语句中实现判断方向并下推到存储层吗

match完整语句如下:

match (v1)-[e]-(v2) 
where 
id(v1)=="c3e4801febf063d976369521418e7d12" and
(case typeid(e)>0 when true then e.send_amt>=... else e.recv_amt>=... end)
return v1, e, v2;

之所以需要判断边的方向,是因为在我们的业务中需要从一个点出发同时遍历出、入两个方向,业务需要对不同方向应用单独的过滤规则

此话题已在最后回复的 30 天后被自动关闭。不再允许新回复。