apache / apache/hugegraph

[Question] HugeGraph 序列化优化/性能优化任务疑问

Open
#2,255 4 comments 3 reactions 1 assignee Claimed by @javeme View on GitHub
Dominant language
Java
Stars
3.2k
Forks
636
Avg merge
3d 11h
Merged PRs (30d)
14

Description

### Problem Type (问题类型)

others (please edit later)

### 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 (环境信息)

需求疑问,没有环境信息

### Your Question (问题描述)

我想问下这个需求的相关信息
![image](https://github.com/apache/incubator-hugegraph/assets/55943045/f874eb96-8239-4948-a483-b24fdacef79c)

问题1:这个需求优化的接口是不是 org.apache.hugegraph.api.graph.EdgeAPI#list 接口

问题2:如果是该接口的话,那么我理解是如果查询的 label 不为空,那么直接从 schema 中判断是否存在对应的 edgelabel,但是需求描述是“如果顶点类型不具有该类型边”,我的判断好像是直接判断 label,并没有判断到顶点

问题3:如果我上面的理解没有错误的话,那么添加的代码大概如下图1,当 label 不存在时,我返回一个空迭代器,但是当 page != null 成立时,会报错,大致调用大概如下图2,我问了ChatGPT和查阅了部分文档,不知道这里怎么返回空,如果有相关文档的话,请发送一下,我去看看
![8d92fed18ffc5b2db36dea15f3bf05a](https://github.com/apache/incubator-hugegraph/assets/55943045/c62589ec-f631-43a9-8a12-55016d8aba02)
![5e0d99ce0dfb371b620fc92aa0a8681](https://github.com/apache/incubator-hugegraph/assets/55943045/e89f5abd-5356-4a1d-b16a-6a33310b530a)

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

_No response_

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

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.