JanusGraph / JanusGraph/janusgraph

Support arrays in GraphSON

Open
#1,295 5 comments 0 reactions 0 assignees View on GitHub
kind/enhancement
Dominant language
Java
Stars
5.8k
Forks
1.2k
Avg merge
13h 53m
Merged PRs (30d)
6

Description

JanusGraph supports arrays of primitive types for property types:
```groovy
mgmt.makePropertyKey('vec').dataType(float[]).cardinality(Cardinality.SINGLE).make()
```

Unfortunately, this feature cannot be used with GraphSON right now as we don't have serialization support for arrays. Instead, the array is serialized as a list by the driver which leads to an error on the server side:
```
Expected: class [F, found: class java.util.ArrayList
```

(More information with a concrete example on [gremlin-users](https://groups.google.com/d/msg/gremlin-users/3OyXb1x0s4Q/pm93joFiBAAJ).)

Contributor guide

Open the contributing guide

Research direction

The issue names GraphSON serialization but no source file or test entry point. Start by locating the GraphSON serialization code and its tests, then reproduce the primitive-array example and the ArrayList type error. Done means primitive arrays such as float[] can be serialized and accepted by the server without being treated as lists.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.