[Question] Define numeric-literal coercion for DOUBLE property predicates
维护者通常 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 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
apache/hugegraph-doc 的其他 Issue
-
enhancement
难度 1/5 1-3 小时 新手友好度 68/100
apache/hugegraph-doc#467 · 13 条评论 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 30/100
apache/hugegraph-doc#495 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
apache/hugegraph-doc#491 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 42/100
apache/hugegraph-doc#471 ·
维护者通常 1 天内回复
-
enhancement
难度 5/5 一周以上 新手友好度 35/100
apache/hugegraph-doc#469 ·
维护者通常 1 天内回复
查看 apache/hugegraph-doc 的全部 Issue
相似的 Issue
-
Server mode OAuth2: 'NoneType' object is not subscriptable on every request after re-submitting the OAuth2 login while already logged in可能已有人在做 @Rarasinhoo 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 88/100
pgadmin-org/pgadmin4#10733 ·
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
aws-samples/sample-per-model-bedrock#752 ·
维护者通常 1 天内回复
-
lesson-submission pending-review
难度 1/5 1 小时以内 新手友好度 72/100
Ikalus1988/MisakaNet#4452 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 78/100
OCHA-DAP/topo-tools#250 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复