Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug] ORDER BY on a Boolean-or-null grouping key throws ClassCastException

Đang mở
#3,319 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
66/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
databases

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
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:latest as 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.
Ngôn ngữ chính
Java
Star
3.2k
Fork
641
Merge trung bình
1 ngày 9 giờ
Pull request đã merge (30 ngày)
60

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/hugegraph

Tất cả issue của apache/hugegraph

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.