[Bug] ORDER BY on a Boolean-or-null grouping key throws ClassCastException
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by tracing the Cypher REST query path for the supplied OPTIONAL MATCH, aggregation, and ORDER BY, then locate how grouping keys with Boolean and null values are compared. Reproduce the failure with the three vertices described in the issue and check the query's ordering behavior. Done means the query returns three rows for null, true, and false in the expected descending order without a ClassCastException.
由索引模型根据 Issue 内容生成。
描述
Bug Type (问题类型)
rest-api (结果不合预期)
Before submit
- 我已经确认现有的 Issues 与 FAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
Environment (环境信息)
- Server Version: 1.7.0
- Docker Image:
hugegraph/hugegraph:latestas tested on 2026-09-27 - Backend: default Docker standalone backend
- Interface: Cypher REST endpoint
Expected & Actual behavior (期望与实际表现)
CREATE (:L5 {b0: false, id: 0}),
(:L4 {b0: true, id: 1}),
(:L4 {id: 2});
MATCH (n)
OPTIONAL MATCH (n)-[r0:T1]->(n1 {s1: 'v4_4'})
WITH n.b0 AS g, count(n1.id) AS c
RETURN g, c ORDER BY g DESC;
Expected: three rows for null, true and false, each with count 0,
ordered according to Cypher's descending null/Boolean ordering.
Actual: execution fails and leaks a Java implementation exception:
class java.lang.String cannot be cast to class java.lang.Boolean
Vertex/Edge example (问题点 / 边数据举例)
Three vertices are sufficient; one has `b0=false`, one has `b0=true`, and one
omits `b0`. No `T1` edge is required.
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
- Vertex labels: `L4`, `L5`
- Properties: `b0` Boolean and nullable/missing; `id` integer
- Edge label referenced by the optional pattern: `T1`
- No secondary index is required.
- 主要语言
- Java
- 星标
- 3.2k
- 派生
- 641
- 平均合并
- 1 天 9 小时
- 30 天内合并 PR
- 74
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/hugegraph 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
apache/hugegraph#3231 · 1 条评论 ·
维护者通常 1 天内回复
-
help wanted improvement rust
难度 5/5 一周以上 新手友好度 12/100
维护者通常 1 天内回复
-
bug
难度 4/5 3-5 天 新手友好度 52/100
维护者通常 1 天内回复
-
[Bug] CI accepts obsolete PR targets after retargeting or force-push可能重新可做 关联的 PR 已关闭且未合并。 未关闭
难度 3/5 1-2 天 新手友好度 25/100
维护者通常 1 天内回复
-
[Feature] Server image: map server.urls_to_pd and server.deploy_in_k8s from the environment, and stop editing conf files in place可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 4/5 3-5 天 新手友好度 48/100
维护者通常 1 天内回复
相似的 Issue
-
approved bug
难度 2/5 1-3 小时 新手友好度 70/100
checkstyle/checkstyle#21981 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
beehive-lab/TornadoVM#1248 ·
维护者通常 1 天内回复
-
bug jdbc-v2
难度 2/5 1-3 小时 新手友好度 70/100
ClickHouse/clickhouse-java#3214 ·
维护者通常 1 天内回复
-
area: detector eco: java help wanted lane: free-agent roadmap size: S type: parser
难度 2/5 1-3 小时 新手友好度 62/100
arminazimi/evergreen#355 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
micronaut-projects/micronaut-data#4134 ·
维护者通常 1 天内回复