[Question] Define numeric-literal coercion for DOUBLE property predicates

Abierto
#556 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
Medio día
Aptitud para principiantes
45/100
Tipo de issue
Documentación
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
groovy

Línea de trabajo

Start from the Gremlin language reference at docs/language/hugegraph-gremlin and the propertykey REST page linked in the issue, since the gap is in how has predicates on DOUBLE properties are described. Run the reproduction snippet against a memory-backend server to see which literal forms (plain decimal, d suffix, integer) match the stored 1.0 value. Done means the docs state the coercion rule and include a working example with the verified suffix requirements.

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

Descripción

Problem Type (问题类型)

lack info (文档描述缺失)

Your Question (问题描述)

Problem Type

lack info in apache/hugegraph-doc. If submitted through the public fallback
form in apache/hugegraph, select configs (documentation related).

Your Question

Environment
  • Server Version: Apache HugeGraph 1.7.0
  • Gremlin Version: 3.5.1
  • Backend: memory
  • Data Size: 2 vertices and 1 edge
Missing documentation information

The documentation defines numeric property types and supported has
predicates but does not state how Gremlin-Groovy numeric literal classes are
compared with a stored DOUBLE property. An unsuffixed decimal literal is not
necessarily a Java Double, so this affects query results.

Reproduction case
schema.propertyKey('weight').asDouble().ifNotExist().create()
schema.vertexLabel('DocVertex').useCustomizeStringId().ifNotExist().create()
schema.edgeLabel('DocEdge').sourceLabel('DocVertex').targetLabel('DocVertex').properties('weight').ifNotExist().create()
g.addV('DocVertex').property(T.id, 'a').iterate()
g.addV('DocVertex').property(T.id, 'b').iterate()
g.V('a').addE('DocEdge').to(__.V('b')).property('weight', 1.0d).iterate()
g.E().has('weight', P.within(1.0)).has('weight', P.lt(1.5)).count()
Expected result

Please document whether numeric predicates use value-based numeric coercion or
require compatible runtime numeric classes, including any required literal
suffixes.

Actual result

The traversal returns 0 even though the edge stores the DOUBLE value 1.0,
which is numerically within 1.0 and less than 1.5.

Reference document URL

https://hugegraph.apache.org/docs/language/hugegraph-gremlin/

https://hugegraph.apache.org/docs/clients/restful-api/propertykey/

Lenguaje dominante
Python
Estrellas
71
Forks
129
Merge medio
3 d 4 h
PR fusionados (30 d)
43

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

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-doc

Todos los issues de apache/hugegraph-doc

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.