jokerCoCo commented on issue #1972: URL: https://github.com/apache/incubator-hugegraph/issues/1972#issuecomment-1280335573
> 我这边简单的构造了一个示例数据,尝试了一下如下语句是可行的: > > ```java > g.V().hasLabel('node').group().by{it.values('city', 'profession').toList()}.by(id) > ``` > > 示例数据: > > ```java > schema=graph.schema(); > schema.propertyKey('profession').asText().ifNotExist().create(); > schema.propertyKey('city').asText().ifNotExist().create(); > schema.vertexLabel('node')properties('profession','city').useCustomizeNumberId().create(); > schema.edgeLabel('child').sourceLabel('node').targetLabel('node').create(); > > g.addV('node').property(id, 1).property('profession', "Java").property('city', 'Beijing').as('1') > .addV('node').property(id, 2).property('profession', "Java").property('city', 'Beijing').as('2') > .addV('node').property(id, 3).property('profession', "Java").property('city', 'Sanghai').as('3') > .addV('node').property(id, 4).property('profession', "DB").property('city', 'Sanghai').as('4') > .addE('child').from('1').to('2') > .addE('child').from('2').to('3') > .addE('child').from('4').to('3') > ``` 非常感谢您的回复,这样确实可以实现多属性分组。但是分组后依旧会存在重复,请问该如何实现分组后对每组根据指定属性去重? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@hugegraph.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org