根据函数输出值order by

  • nebula 版本:3.0.0
  • 部署方式: 单机
  • 安装方式: RPM
  • 是否为线上版本:Y
  • 硬件信息
    • 磁盘 SSD
    • CPU 48c、内存128G
GO FROM 22370604 over t_p YIELD dst(edge) as pid | GO FROM $-.pid over p_o WHERE properties($$).n is not null 
YIELD src(edge) as pid, properties($^).pv as pv, properties($^).pr as pr, properties($$).pv as o_pv, properties($$).pr as o_pr, properties($$).cnt as o_cnt, dst(edge) as oid, properties($$).n as name | 
group by $-.oid,$-.name,$-.o_pv,$-.o_pr,$-.o_cnt 
YIELD sum($-.pv) as r_pv, sum($-.pr) as r_pr, count($-.pid) as r_cnt, $-.o_pv as o_pv, $-.o_pr as o_pr, $-.o_cnt as o_cnt, $-.oid as oid, $-.name as name,(sum($-.pv)/($-.o_pv+0.00001) + sum($-.pr)/($-.o_pr+0.00001) + count($-.pid)/($-.o_cnt+0.00001)) as vvv | order by $-.vvv 

我想请问order by是否不支持函数输出值,以上查询报错 -1009:SemanticError: $-.vvv', not exist prop vvv’

可以 帮忙 explain 一下,看看吗

1 个赞
14	Project	13		outputVar: [ { "colNames": [ "r_pv", "r_pr", "r_cnt", "o_pv", "o_pr", "o_cnt", "oid", "name", "vvv" ], "type": "DATASET", "name": "__Project_14" } ] inputVar: __Aggregate_13 columns: [ "$r_pv AS r_pv", "$r_pr AS r_pr", "$r_cnt AS r_cnt", "$o_pv AS o_pv", "$o_pr AS o_pr", "$o_cnt AS o_cnt", "$oid AS oid", "$name AS name", "((($sum($-.pv)/($-.o_pv+0.00001))+($sum($-.pr)/($-.o_pr+0.00001)))+($count($-.pid)/($-.o_cnt+0.00001))) AS vvv" ]
13	Aggregate	12		outputVar: [ { "colNames": [ "r_pv", "r_pr", "r_cnt", "o_pv", "o_pr", "o_cnt", "oid", "name", "sum($-.pv)", "sum($-.pr)", "count($-.pid)" ], "type": "DATASET", "name": "__Aggregate_13" } ] inputVar: __Project_12 groupKeys: [ "$-.oid", "$-.name", "$-.o_pv", "$-.o_pr", "$-.o_cnt" ] groupItems: [ { "expr": "sum($-.pv)" }, { "expr": "sum($-.pr)" }, { "expr": "count($-.pid)" }, { "expr": "$-.o_pv" }, { "expr": "$-.o_pr" }, { "expr": "$-.o_cnt" }, { "expr": "$-.oid" }, { "expr": "$-.name" }, { "expr": "sum($-.pv)" }, { "expr": "sum($-.pr)" }, { "expr": "count($-.pid)" } ]
12	Project	11		outputVar: [ { "colNames": [ "pid", "pv", "pr", "o_pv", "o_pr", "o_cnt", "oid", "name" ], "type": "DATASET", "name": "__Project_12" } ] inputVar: __Filter_11 columns: [ "src(EDGE) AS pid", "properties($^).pv AS pv", "properties($^).pr AS pr", "properties($$).pv AS o_pv", "properties($$).pr AS o_pr", "properties($$).cnt AS o_cnt", "dst(EDGE) AS oid", "properties($$).n AS name" ]
11	Filter	10		outputVar: [ { "colNames": [ "EDGE", "$^", "_vid", "JOIN_DST_VID", "$$", "DST_VID", "pid" ], "type": "DATASET", "name": "__Filter_11" } ] inputVar: __InnerJoin_10 condition: properties($$).n IS NOT NULL isStable: false
10	InnerJoin	9		outputVar: [ { "colNames": [ "EDGE", "$^", "_vid", "JOIN_DST_VID", "$$", "DST_VID", "pid" ], "type": "DATASET", "name": "__InnerJoin_10" } ] inputVar: { "rightVar": { "__Project_2": "0" }, "leftVar": { "__LeftJoin_9": "0" } } hashKeys: [ "$__LeftJoin_9._vid" ] probeKeys: [ "$-.pid" ] kind: InnerJoin
9	LeftJoin	8		outputVar: [ { "colNames": [ "EDGE", "$^", "_vid", "JOIN_DST_VID", "$$", "DST_VID" ], "type": "DATASET", "name": "__LeftJoin_9" } ] inputVar: { "rightVar": { "__Project_8": "0" }, "leftVar": { "__Project_6": "0" } } hashKeys: [ "COLUMN[-1]" ] probeKeys: [ "COLUMN[-1]" ] kind: LeftJoin
8	Project	7		outputVar: [ { "colNames": [ "$$", "DST_VID" ], "type": "DATASET", "name": "__Project_8" } ] inputVar: __GetVertices_7 columns: [ "$$ AS $$", "COLUMN[0] AS DST_VID" ]
7	GetVertices	6		outputVar: [ { "colNames": [], "type": "DATASET", "name": "__GetVertices_7" } ] inputVar: __Project_6 space: 18 dedup: true limit: 9223372036854775807 filter: orderBy: [] src: COLUMN[-1] props: [ { "props": [ "_tag", "c", "cnt", "n", "pr", "pv" ], "tagId": 21 }, { "props": [ "_tag", "n" ], "tagId": 20 }, { "props": [ "_tag", "pr", "pv" ], "tagId": 19 } ] exprs:
6	Project	16		outputVar: [ { "colNames": [ "EDGE", "$^", "_vid", "JOIN_DST_VID" ], "type": "DATASET", "name": "__Project_6" } ] inputVar: __GetNeighbors_5 columns: [ "EDGE AS EDGE", "$^ AS $^", "COLUMN[0] AS _vid", "*._dst AS JOIN_DST_VID" ]
16	GetNeighbors	2		outputVar: [ { "colNames": [], "type": "DATASET", "name": "__GetNeighbors_5" } ] inputVar: __Project_2 space: 18 dedup: true limit: -1 filter: orderBy: [] src: $-.pid edgeTypes: [] edgeDirection: OUT_EDGE vertexProps: [ { "props": [ "_tag", "c", "cnt", "n", "pr", "pv" ], "tagId": 21 }, { "props": [ "_tag", "n" ], "tagId": 20 }, { "props": [ "_tag", "pr", "pv" ], "tagId": 19 } ] edgeProps: [ { "props": [ "_dst", "_rank", "_src", "_type" ], "type": "23" } ] statProps: exprs: random: false

result (1).csv (5.8 KB)

复现了你的问题了, 已经提了issue order by error · Issue #4099 · vesoft-inc/nebula · GitHub

1 个赞

:thinking: 我们三月在捉版本虫,你这个 bug 被我 pick 到活动贴里了哈:捉虫活动 | Nebula Graph v3.0.0 BUG 悬赏 参考上面的链接哈

ok

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