You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hugegraph.apache.org by GitBox <gi...@apache.org> on 2022/10/19 01:47:19 UTC

[GitHub] [incubator-hugegraph] zhengyingying opened a new issue, #1981: Incorrect count() with sample()

zhengyingying opened a new issue, #1981:
URL: https://github.com/apache/incubator-hugegraph/issues/1981

   ### Bug Type (问题类型)
   
   _No response_
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/hugegraph/hugegraph/issues) 与 [FAQ](https://hugegraph.github.io/hugegraph-doc/guides/faq.html) 中没有相同 / 重复问题
   
   ### Environment (环境信息)
   
   - Server Version: v0.12.0
   - Backend: inmemory 
   - OS: xx CPUs, xx G RAM, Centos 7.x 
   - Data Size:  xx vertices, xx edges <!-- (like 1000W 点, 9000W 边) -->
   
   
   ### Expected & Actual behavior (期望与实际表现)
   
   We create three vertices and expect the second query return value `2`, but it returns value `3`. 
   
   ```
   gremlin> :> hugegraph.traversal().V().sample(2)
   ==>[id:647369467348647938,label:product,type:vertex,properties:[name:product3]]
   ==>[id:647369467348647937,label:product,type:vertex,properties:[name:product2,price:4.5688]]
   gremlin> :> hugegraph.traversal().V().sample(2).count()
   ==>3
   ```
   
   The vertex example:
   ```
   schema.propertyKey("name").asText().ifNotExist().create();
   schema.propertyKey("price").asDouble().ifNotExist().create();
   schema.vertexLabel("product").properties("name", "price").nullableKeys("name", "price").create();
   schema.indexLabel("productbyname").onV("product").by("name").shard().ifNotExist().create();
   schema.indexLabel("productbyprice").onV("product").by("price").shard().ifNotExist().create();
   
   Vertex product1 = new Vertex("product").property("name", "product1").property("price", 3.254615);
   Vertex product2 = new Vertex("product").property("name", "product2").property("price", 4.5688);
   Vertex product3 = new Vertex("product").property("name", "product3");
   ```
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   _No response_
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-hugegraph] javeme commented on issue #1981: Incorrect count() with sample()

Posted by GitBox <gi...@apache.org>.
javeme commented on issue #1981:
URL: https://github.com/apache/incubator-hugegraph/issues/1981#issuecomment-1284054177

   Thanks for your report


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org