Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

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

Abierto
#3,319 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
66/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java
Área
databases

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
Java
Estrellas
3.2k
Forks
641
Merge medio
1 d 9 h
PR fusionados (30 d)
74

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de apache/hugegraph

Todos los issues de apache/hugegraph

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.