apache / apache/hugegraph-toolchain

[Bug] huge-client failed to write attributes of Blob type

Open
#489 0 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
121
Forks
125
Avg merge
10d 10h
Merged PRs (30d)
3

Description

### Bug Type (问题类型)

None

### Before submit

- [X] I had searched in the [issues](https://github.com/apache/hugegraph-toolchain/issues) and found no similar issues.

### Environment (环境信息)

- Server Version: v1.0.0
- Toolchain Version: v1.0.0
- Data Size: xx vertices, xx edges

### Expected & Actual behavior (期望与实际表现)

schema:
SchemaManager schema = hugeClient.schema();

schema.propertyKey("testBlob").asBlob().ifNotExist().create();

code example:
GraphManager graph = hugeClient.graph();
Vertex user1 = graph.addVertex(T.LABEL,"USER", T.ID,"user_1",
"testBlob", Blob.wrap(s.getBytes()));

error message:
java.lang.IllegalArgumentException: Invalid property value type: 'class org.apache.hugegraph.util.Blob'

at com.google.common.base.Preconditions.checkArgument(Preconditions.java:164)
at org.apache.hugegraph.util.E.checkArgument(E.java:52)
at org.apache.hugegraph.structure.GraphElement.property(GraphElement.java:77)
at org.apache.hugegraph.structure.graph.Vertex.property(Vertex.java:67)
at org.apache.hugegraph.structure.graph.Vertex.property(Vertex.java:29)
at org.apache.hugegraph.driver.GraphManager.attachProperties(GraphManager.java:469)
at org.apache.hugegraph.driver.GraphManager.addVertex(GraphManager.java:71);

cause of error:
![image](https://github.com/apache/incubator-hugegraph-toolchain/assets/30570711/f4e8069f-2663-4e66-baa3-85c1525ba17f)

there is no Blob type in the verified class

### Vertex/Edge example (问题点 / 边数据举例)

_No response_

### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the reported path in GraphManager.attachProperties and GraphElement.property, then reproduce the addVertex example using a Blob property created through schema.propertyKey(...).asBlob(). The work is done when the example no longer raises Invalid property value type and the Blob attribute is written successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.