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

   ### Bug Type (问题类型)
   
   None
   
   ### Before submit
   
   - [X] 我已经确认现有的 [Issues](https://github.com/apache/hugegraph/issues) 与 
[FAQ](https://hugegraph.apache.org/docs/guides/faq/) 中没有相同 / 重复问题 (I have 
confirmed and searched that there are no similar problems in the historical 
issue and documents)
   
   ### Environment (环境信息)
   
   - HugeGraph Version: 0.12.0
   - Storage Backend: inmemory
   - Mixed Index Backend: none
   - Link to discussed bug: none
   - Operating system: macOS 13.2.1
   - API/Driver: Java
   
   ### Expected & Actual behavior (期望与实际表现)
   
   ### Expected behavior:
   We construct the following scenario: we randomly generate two queries Q1, 
Q2, and merge these two queries using AND logical operator into a new query Q3. 
Based on the AND calculation. The Q3 query result set should be the 
intersection of result sets from Q1 and Q2.
   We generate graph schema and data based on random strings and values. Here 
is one of our examples that triggered the bug.
   1) `g.V().outE('el1').has('ep0', 
inside(0.26257116683022674,0.9491151866694021)).outV()` returns 
`[698910130770542592, 698910130791514112, 698910130812485632, 
698910130829262848, 698910130850234368]`
   2) `g.V().out('el0')` returns `[698910130674073600, 698910130674073600, 
698910130711822336, 698910130711822336, 698910130749571072, 698910130770542592, 
698910130791514112, 698910130812485632, 698910130829262848, 698910130850234368, 
698910130850234368, 698910130867011584, 698910130867011584]`
   3) `g.V().and(outE('el1').has('ep0', 
inside(0.26257116683022674,0.9491151866694021)).outV(),out('el0'))` returns 
**an empty set**.
   
   We calculate the intersection result set of Q1 and Q2, which is 
`[698910130770542592, 698910130791514112, 698910130812485632, 
698910130829262848, 698910130850234368]`.
   The intersection result set doesn't equal to Q3 result set.
   
   ### Actual behavior:
   The intersection result set should equal to Q3 result set. We did trigger 
some cases conform to this requirement, but still there're some cases that 
violate this constraint.
   
   ### Vertex/Edge example (问题点 / 边数据举例)
   
   ```javascript
   ### Steps to reproduce:
   We create a graph with 10 nodes and 20 edges. We try to make it clear to 
reproduce the bugs, hope to not cause much **inconvenience** to your reviewing, 
but we believe the problem does exist.
   Following the following graph data generation query, we can reproduce the 
bugs:
   
   - Create data
   
   Vertex:
   
g.addV('vl0').property('vp0','false').property('vp3','0.11901258738738996').property('vp2','0.63591534').property('vp4','0.11901258738738996').property(T.id,698910130674073600)
   
g.addV('vl0').property('vp3','0.768218427293753').property(T.id,698910130711822336)
   
g.addV('vl0').property('vp0','false').property('vp3','0.587157222635081').property('vp4','0.039931592743848277').property(T.id,698910130728599552)
   
g.addV('vl0').property('vp0','false').property('vp3','0.8060767940441078').property('vp4','0.7147467048901186').property(T.id,698910130749571072)
   
g.addV('vl0').property('vp0','true').property('vp3','0.8060767940441078').property('vp2','0.13471144').property('vp4','0.08673768791354186').property(T.id,698910130770542592)
   
g.addV('vl0').property('vp0','false').property('vp3','0.7147467048901186').property('vp2','0.40616316').property(T.id,698910130791514112)
   g.addV('vl0').property('vp0','false').property(T.id,698910130812485632)
   
g.addV('vl0').property('vp3','0.8984566565808907').property('vp2','0.8857693').property(T.id,698910130829262848)
   
g.addV('vl0').property('vp0','true').property('vp3','0.41031638957410377').property('vp2','0.025008798').property('vp4','0.1968631072861693').property(T.id,698910130850234368)
   
g.addV('vl0').property('vp0','true').property('vp4','0.5947836228331603').property(T.id,698910130867011584)
   Edge:
   
g.V(698910130674073600).as('698910130674073600').V(698910130867011584).as('698910130867011584').addE('el0').from('698910130674073600').to('698910130867011584')
   
g.V(698910130867011584).as('698910130867011584').V(698910130812485632).as('698910130812485632').addE('el1').from('698910130867011584').to('698910130812485632')
   
g.V(698910130749571072).as('698910130749571072').V(698910130791514112).as('698910130791514112').addE('el1').from('698910130749571072').to('698910130791514112')
   
g.V(698910130711822336).as('698910130711822336').V(698910130829262848).as('698910130829262848').addE('el1').from('698910130711822336').to('698910130829262848')
   
g.V(698910130791514112).as('698910130791514112').V(698910130711822336).as('698910130711822336').addE('el1').from('698910130791514112').to('698910130711822336')
   
g.V(698910130850234368).as('698910130850234368').V(698910130770542592).as('698910130770542592').addE('el1').from('698910130850234368').to('698910130770542592')
   
g.V(698910130711822336).as('698910130711822336').V(698910130829262848).as('698910130829262848').addE('el0').from('698910130711822336').to('698910130829262848')
   
g.V(698910130770542592).as('698910130770542592').V(698910130867011584).as('698910130867011584').addE('el1').from('698910130770542592').to('698910130867011584')
   
g.V(698910130812485632).as('698910130812485632').V(698910130674073600).as('698910130674073600').addE('el1').from('698910130812485632').to('698910130674073600')
   
g.V(698910130674073600).as('698910130674073600').V(698910130850234368).as('698910130850234368').addE('el0').from('698910130674073600').to('698910130850234368')
   
g.V(698910130749571072).as('698910130749571072').V(698910130850234368).as('698910130850234368').addE('el1').from('698910130749571072').to('698910130850234368')
   
g.V(698910130749571072).as('698910130749571072').V(698910130728599552).as('698910130728599552').addE('el0').from('698910130749571072').to('698910130728599552')
   
g.V(698910130749571072).as('698910130749571072').V(698910130812485632).as('698910130812485632').addE('el1').from('698910130749571072').to('698910130812485632')
   
g.V(698910130867011584).as('698910130867011584').V(698910130711822336).as('698910130711822336').addE('el0').from('698910130867011584').to('698910130711822336')
   
g.V(698910130770542592).as('698910130770542592').V(698910130850234368).as('698910130850234368').addE('el0').from('698910130770542592').to('698910130850234368')
   
g.V(698910130711822336).as('698910130711822336').V(698910130791514112).as('698910130791514112').addE('el0').from('698910130711822336').to('698910130791514112')
   
g.V(698910130867011584).as('698910130867011584').V(698910130674073600).as('698910130674073600').addE('el0').from('698910130867011584').to('698910130674073600')
   
g.V(698910130850234368).as('698910130850234368').V(698910130812485632).as('698910130812485632').addE('el0').from('698910130850234368').to('698910130812485632')
   
g.V(698910130749571072).as('698910130749571072').V(698910130728599552).as('698910130728599552').addE('el1').from('698910130749571072').to('698910130728599552')
   
g.V(698910130674073600).as('698910130674073600').V(698910130867011584).as('698910130867011584').addE('el1').from('698910130674073600').to('698910130867011584')
   ```
   ```
   
   
   ### Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
   
   ```javascript
   - Create schema
   
   schema().propertyKey('vp0').asBoolean().ifNotExist().create();
   schema().propertyKey('vp1').asLong().ifNotExist().create();
   schema().propertyKey('vp2').asFloat().ifNotExist().create();
   schema().propertyKey('vp3').asDouble().ifNotExist().create();
   schema().propertyKey('vp4').asDouble().ifNotExist().create();
   schema().propertyKey('vp5').asBoolean().ifNotExist().create();
   schema().vertexLabel('vl0').ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp0').nullableKeys('vp0').append();
   
schema().indexLabel('vl0byvp0Shard').onV('vl0').by('vp0').shard().ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp4').nullableKeys('vp4').append();
   
schema().indexLabel('vl0byvp4Shard').onV('vl0').by('vp4').shard().ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp2').nullableKeys('vp2').append();
   
schema().indexLabel('vl0byvp2Shard').onV('vl0').by('vp2').shard().ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp3').nullableKeys('vp3').append();
   
schema().indexLabel('vl0byvp3Shard').onV('vl0').by('vp3').shard().ifNotExist().create();
   schema().propertyKey('ep0').asDouble().ifNotExist().create();
   schema().propertyKey('ep1').asDouble().ifNotExist().create();
   schema().propertyKey('ep2').asInt().ifNotExist().create();
   schema().propertyKey('ep3').asText().ifNotExist().create();
   schema().propertyKey('ep4').asInt().ifNotExist().create();
   schema().propertyKey('ep5').asDouble().ifNotExist().create();
   schema().propertyKey('ep6').asFloat().ifNotExist().create();
   schema().edgeLabel('el0').link('vl0', 'vl0').ifNotExist().create();
   schema().edgeLabel('el0').properties('ep6').nullableKeys('ep6').append();
   
schema().indexLabel('el0byep6Shard').onE('el0').by('ep6').shard().ifNotExist().create();
   schema().edgeLabel('el0').properties('ep5').nullableKeys('ep5').append();
   
schema().indexLabel('el0byep5Shard').onE('el0').by('ep5').shard().ifNotExist().create();
   schema().edgeLabel('el0').properties('ep0').nullableKeys('ep0').append();
   
schema().indexLabel('el0byep0Shard').onE('el0').by('ep0').shard().ifNotExist().create();
   schema().edgeLabel('el0').properties('ep2').nullableKeys('ep2').append();
   
schema().indexLabel('el0byep2Shard').onE('el0').by('ep2').shard().ifNotExist().create();
   schema().edgeLabel('el0').properties('ep1').nullableKeys('ep1').append();
   
schema().indexLabel('el0byep1Shard').onE('el0').by('ep1').shard().ifNotExist().create();
   schema().edgeLabel('el1').link('vl0', 'vl0').ifNotExist().create();
   schema().edgeLabel('el1').properties('ep2').nullableKeys('ep2').append();
   
schema().indexLabel('el1byep2Shard').onE('el1').by('ep2').shard().ifNotExist().create();
   schema().edgeLabel('el1').properties('ep0').nullableKeys('ep0').append();
   
schema().indexLabel('el1byep0Shard').onE('el1').by('ep0').shard().ifNotExist().create();
   schema().edgeLabel('el1').properties('ep5').nullableKeys('ep5').append();
   
schema().indexLabel('el1byep5Shard').onE('el1').by('ep5').shard().ifNotExist().create();
   schema().edgeLabel('el1').properties('ep3').nullableKeys('ep3').append();
   
schema().indexLabel('el1byep3Shard').onE('el1').by('ep3').shard().ifNotExist().create();
   ```
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to