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

オープン
#556 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@n24q02m がすでに取り組んでいます。

2026年11月6日 から。

  • #561 @n24q02m による — オープン

評価

難易度
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時間
マージ済み PR(30日)
43

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/hugegraph-doc のほかの issue

apache/hugegraph-doc の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。