IiCEight commented on issue #3446:
URL: https://github.com/apache/hugegraph/issues/3446#issuecomment-6735345445

   I investigated this and could not reproduce the reported default traversal 
failure on a locally source-built HugeGraph 1.8.0 runtime using TinkerPop 3.8.1.
   
   I checked both an embedded memory-backend traversal with `JsonUtil.toJson()` 
and the `/gremlin` REST endpoint on a standalone RocksDB instance. `/versions` 
on the REST instance reports `core: 1.8.0` and `gremlin: 3.8.1`.
   
   For the REST check, I created a fresh vertex label with `CUSTOMIZE_STRING` 
IDs and no declared properties, then one vertex with `properties: {}`. Using 
that vertex's ID, the results were:
   
   | Traversal | HTTP status | `result.data` |
   | --- | --- | --- |
   | `g.V(id).count()` | 200 | `[1]` |
   | `g.V(id).groupCount().by('d1')` | 200 | `[{}]` |
   | `g.V(id).groupCount().by(__.coalesce(__.values('d1'), 
__.constant('__missing__')))` | 200 | `[{"__missing__":1}]` |
   
   The temporary vertex and label were removed afterward.
   
   This appears to be explained by TinkerPop's change to missing-value behavior 
in 3.6.0. Previously, a missing grouping property could create a null-key 
bucket. Starting in 3.6.0, an unproductive `by()` modulator filters out the 
corresponding traverser, so this example produces an empty map. The upstream 
upgrade guide explicitly compares `groupCount().by('age')` before and after the 
change: [Consistent by() 
Behavior](https://tinkerpop.apache.org/docs/3.6.0/upgrade/#_consistent_by_behavior).
 HugeGraph upgraded its TinkerPop dependency from 3.5.1 to 3.8.1 in 
[ba1c6ab73](https://github.com/apache/hugegraph/commit/ba1c6ab73a4316bb5fcf531a3528831ed3c50051).
   
   There is a distinction between avoiding the null key and supporting its 
serialization: in the separate embedded memory probe, explicitly adding 
`ProductiveByStrategy.instance()` restored a `{null=1}` grouping result, and 
passing that result to `JsonUtil.toJson()` reproduced the reported null-map-key 
exception. Thus, the successful default traversal does not establish that 
arbitrary null-keyed maps can now be serialized.
   
   I have not rerun the original HugeGraph 1.7.0 release or verified a newer 
published release. These findings suggest the reported default case no longer 
reproduces on the tested development runtime. A regression test covering this 
traversal and its REST response would help preserve that behavior; any 
maintenance-branch fix would need a separate assessment.
   


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to