-
-
Notifications
You must be signed in to change notification settings - Fork 90
Description
We discovered a bug that Merged query using Collections returns false results.
- ArcadeDB Version: 22.12.1
- Operating system: macOS 13.2.1
- JDK Version: 11
- API/Driver: Java
Expected behavior:
We construct the following scenario: we randomly generate two queries Q1, Q2, and merge these two queries using Collections into a new query Q3. Based on the intersection calculation. The Q3 query result set should be the intersection of result sets from Q1 and Q2. We generate the intersection queries based on the reference here: https://stackoverflow.com/questions/48067834/gremlin-intersection-operation.
We generate graph schema and data based on random strings and values. Here is one of our examples that triggered the bug.
g.V().out('el0','el1')returns[#161:281, #164:281, #167:280, #170:280, #173:280, #176:279, #182:277, #77:241, #80:241, #83:240]g.V().hasLabel('vl1').hasNot('vp5')returns[#77:241, #80:241]g.V().out('el0','el1').as('a').V().hasLabel('vl1').hasNot('vp5').as('b').select('a').where('a',eq('b'))returns[#80:241].
We calculate the intersection result set of Q1 and Q2, which is [#77:241, #80:241].
The intersection result set doesn't equal to Q3 result set.
Actual behavior:
The intersection result set should equal to Q3 result set. Although the consistency logic is quite similar to issue #942 , the queries syntaxes are different. We submit this issue in case.
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('vp5','-120275209').property(T.id,#182:277)
g.addV('vl1').property('vp1','-1.20275209E8').property(T.id,#77:241)
g.addV('vl0').property('vp5','-127111898').property(T.id,#161:281)
g.addV('vl0').property('vp0','false').property('vp5','-171800784').property('vp4','0.38808167').property(T.id,#164:281)
g.addV('vl1').property('vp1','0.8297969044382184').property(T.id,#80:241)
g.addV('vl0').property('vp5','-127111898').property('vp4','0.709114').property(T.id,#167:280)
g.addV('vl0').property('vp0','false').property(T.id,#170:280)
g.addV('vl1').property('vp1','0.8297969044382184').property('vp3','false').property('vp5','-120275209').property(T.id,#83:240)
g.addV('vl0').property('vp0','true').property('vp5','-61437529').property('vp4','0.6642192').property(T.id,#173:280)
g.addV('vl0').property('vp5','-127111898').property(T.id,#176:279)
Edge:
g.V(#170:280).as('#170:280').V(#176:279).as('#176:279').addE('el1').from('#170:280').to('#176:279')
g.V(#83:240).as('#83:240').V(#83:240).as('#83:240').addE('el0').from('#83:240').to('#83:240')
g.V(#80:241).as('#80:241').V(#83:240).as('#83:240').addE('el0').from('#80:241').to('#83:240')
g.V(#167:280).as('#167:280').V(#170:280).as('#170:280').addE('el1').from('#167:280').to('#170:280')
g.V(#77:241).as('#77:241').V(#80:241).as('#80:241').addE('el0').from('#77:241').to('#80:241')
g.V(#77:241).as('#77:241').V(#77:241).as('#77:241').addE('el0').from('#77:241').to('#77:241')
g.V(#80:241).as('#80:241').V(#77:241).as('#77:241').addE('el0').from('#80:241').to('#77:241')
g.V(#164:281).as('#164:281').V(#164:281).as('#164:281').addE('el1').from('#164:281').to('#164:281')
g.V(#167:280).as('#167:280').V(#182:277).as('#182:277').addE('el1').from('#167:280').to('#182:277')
g.V(#161:281).as('#161:281').V(#176:279).as('#176:279').addE('el1').from('#161:281').to('#176:279')
g.V(#83:240).as('#83:240').V(#80:241).as('#80:241').addE('el0').from('#83:240').to('#80:241')
g.V(#77:241).as('#77:241').V(#83:240).as('#83:240').addE('el0').from('#77:241').to('#83:240')
g.V(#167:280).as('#167:280').V(#167:280).as('#167:280').addE('el1').from('#167:280').to('#167:280')
g.V(#182:277).as('#182:277').V(#176:279).as('#176:279').addE('el1').from('#182:277').to('#176:279')
g.V(#182:277).as('#182:277').V(#170:280).as('#170:280').addE('el1').from('#182:277').to('#170:280')
g.V(#173:280).as('#173:280').V(#170:280).as('#170:280').addE('el1').from('#173:280').to('#170:280')
g.V(#170:280).as('#170:280').V(#161:281).as('#161:281').addE('el1').from('#170:280').to('#161:281')
g.V(#182:277).as('#182:277').V(#173:280).as('#173:280').addE('el1').from('#182:277').to('#173:280')
g.V(#182:277).as('#182:277').V(#182:277).as('#182:277').addE('el1').from('#182:277').to('#182:277')
g.V(#176:279).as('#176:279').V(#182:277).as('#182:277').addE('el1').from('#176:279').to('#182:277')