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

未关闭
#556 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
45/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
活跃
技术栈
groovy

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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/

主要语言
Python
星标
71
派生
129
平均合并
3 天 4 小时
30 天内合并 PR
43

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 有 Pull Request 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

apache/hugegraph-doc 的其他 Issue

查看 apache/hugegraph-doc 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。