incubator-hugegraph icon indicating copy to clipboard operation
incubator-hugegraph copied to clipboard

choose...option... 语句返回问题

Open baibingzhi opened this issue 8 years ago • 3 comments

gremlin语句: g.V().hasLabel('businessApply').has("serialNo","12***12").choose(values('businessTerm')).option(3, values('businessTerm')).option(1,constant('NNLL'));

Expected behavior 期望表现 根据库中数据应该返回 3

Actual behavior 实际表现 返回EMPTY

Schema: 元数据结构 vertexLabel: businessApply primaryKey: serialNo ( string类型 ) properties: businessTerm ( double 类型 )

Specifications of environment 环境信息 hugegraph version: v0.7.4 operating system: @@CentOS hugegraph backend: memory

备注: 语义大致相同的choose语句可以正常返回3 g.V().hasLabel('businessApply').has("serialNo","12***12").choose(values('businessTerm').is(3),values('businessTerm'),constant('NNLL'))

baibingzhi avatar Oct 30 '18 09:10 baibingzhi

由于是double类型的属性,所以需要使用double的条件: option((double) 3, values('businessTerm'))

javeme avatar Oct 30 '18 12:10 javeme

可以了,多谢老师!! 如果合适的话,建议优化一下这一块内容~~

baibingzhi avatar Oct 31 '18 02:10 baibingzhi

Due to the lack of activity, the current issue is marked as stale and will be closed after 20 days, any update will remove the stale label

github-actions[bot] avatar Jan 23 '22 21:01 github-actions[bot]