javeme commented on issue #1972:
URL: 
https://github.com/apache/incubator-hugegraph/issues/1972#issuecomment-1279895505

   
   我这边简单的构造了一个示例数据,尝试了一下如下语句是可行的:
   ```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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to