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

Open
#489 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

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

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.

Description

bug
Bug Type (问题类型)

None

Before submit
  • I had searched in the 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

there is no Blob type in the verified class

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

No response

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

No response

Dominant language
Java
Stars
121
Forks
125
Avg merge
8d 14h
Merged PRs (30d)
2

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from apache/hugegraph-toolchain

All issues in apache/hugegraph-toolchain

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.