choeoe opened a new issue, #3446:
URL: https://github.com/apache/hugegraph/issues/3446

   ### Bug Type (问题类型)
   
   other exception / error (其他异常报错)
   
   ### Before submit
   
   - [x] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 
[FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have 
confirmed and searched that there are no similar problems in the historical 
issue and documents)
   
   ### Environment (环境信息)
   
   - Server Version: Apache HugeGraph 1.7.0
   - Gremlin Version: 3.5.1
   - Backend: memory
   - Data Size: 1 vertex and 0 edges
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   Create a vertex without property `d1`, then execute a grouping traversal
   through the Gremlin REST endpoint:
   
   ```groovy
   g.V('v1').groupCount().by('d1')
   ```
   
   Expected: the endpoint should return a valid traversal result or a stable
   validation error explaining that the grouping property is absent.
   
   Actual: response serialization fails with:
   
   ```text
   org.apache.hugegraph.HugeException: Can't write json: Null key for a Map not 
allowed in JSON
   ```
   
   The error identifies a `HashMap["null"]` in the response value. The server
   therefore constructs an intermediate result that its REST serializer cannot
   encode.
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   Setup and failing traversal:
   
   
   schema.vertexLabel('DocVertex').useCustomizeStringId().ifNotExist().create()
   g.addV('DocVertex').property(T.id, 'v1').iterate()
   g.V('v1').groupCount().by('d1')
   
   
   The vertex is equivalent to:
   
   
   {
     "id": "v1",
     "label": "DocVertex",
     "properties": {}
   }
   ```
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   {
     "vertex_label": {
       "name": "DocVertex",
       "id_strategy": "CUSTOMIZE_STRING",
       "properties": []
     },
     "edge_labels": [],
     "index_labels": []
   }
   
   
   Reference behavior:
   
   https://hugegraph.apache.org/docs/clients/restful-api/gremlin/
   
   https://tinkerpop.apache.org/docs/3.5.1/reference/#groupcount-step
   ```


-- 
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