You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "llooFlashooll (via GitHub)" <gi...@apache.org> on 2023/03/16 16:49:37 UTC

[GitHub] [incubator-hugegraph] llooFlashooll commented on issue #2157: [Bug] Query partitioning return false results

llooFlashooll commented on issue #2157:
URL: https://github.com/apache/incubator-hugegraph/issues/2157#issuecomment-1472338893

   Sorry, but during my continuous testing, I believe there're still some problems in this part. And other classical GDBs actually support such queries, and even the syntax such as outside() has the wrong arguments order. Let me give you another example.
   1. `g.V().count()` returns 10 
   2. `g.V().has('vp1', gte(0.43878973).or(inside(0.0207991,0.9933907))).count()` returns 14
   3. `g.V().has('vp1', not(gte(0.43878973).or(inside(0.0207991,0.9933907)))).count()` returns 0
   4. `g.V().hasNot('vp1').count()` returns 2
   We can see that sub-queries 2, 3, 4 results: 14 + 0 + 2 != 10
   
   - Schema
   ```
   schema().propertyKey('vp0').asDouble().ifNotExist().create();
   schema().propertyKey('vp1').asFloat().ifNotExist().create();
   schema().propertyKey('vp2').asInt().ifNotExist().create();
   schema().propertyKey('vp3').asInt().ifNotExist().create();
   schema().propertyKey('vp4').asDouble().ifNotExist().create();
   schema().propertyKey('vp5').asFloat().ifNotExist().create();
   schema().propertyKey('vp6').asInt().ifNotExist().create();
   schema().propertyKey('vp7').asDouble().ifNotExist().create();
   schema().propertyKey('vp8').asInt().ifNotExist().create();
   schema().vertexLabel('vl0').ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp2').nullableKeys('vp2').append();
   schema().indexLabel('vl0byvp2Shard').onV('vl0').by('vp2').shard().ifNotExist().create();
   schema().vertexLabel('vl0').properties('vp6').nullableKeys('vp6').append();
   schema().indexLabel('vl0byvp6Shard').onV('vl0').by('vp6').shard().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('vp1').nullableKeys('vp1').append();
   schema().indexLabel('vl0byvp1Shard').onV('vl0').by('vp1').shard().ifNotExist().create();
   schema().propertyKey('ep0').asText().ifNotExist().create();
   schema().propertyKey('ep1').asBoolean().ifNotExist().create();
   schema().propertyKey('ep2').asDouble().ifNotExist().create();
   schema().propertyKey('ep3').asLong().ifNotExist().create();
   schema().propertyKey('ep4').asDouble().ifNotExist().create();
   schema().propertyKey('ep5').asFloat().ifNotExist().create();
   schema().propertyKey('ep6').asText().ifNotExist().create();
   schema().edgeLabel('el0').link('vl0', 'vl0').ifNotExist().create();
   schema().edgeLabel('el0').properties('ep3').nullableKeys('ep3').append();
   schema().indexLabel('el0byep3Shard').onE('el0').by('ep3').shard().ifNotExist().create();
   schema().edgeLabel('el0').properties('ep4').nullableKeys('ep4').append();
   schema().indexLabel('el0byep4Shard').onE('el0').by('ep4').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('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('ep5').nullableKeys('ep5').append();
   schema().indexLabel('el1byep5Shard').onE('el1').by('ep5').shard().ifNotExist().create();
   schema().edgeLabel('el2').link('vl0', 'vl0').ifNotExist().create();
   schema().edgeLabel('el2').properties('ep1').nullableKeys('ep1').append();
   schema().indexLabel('el2byep1Shard').onE('el2').by('ep1').shard().ifNotExist().create();
   schema().edgeLabel('el2').properties('ep0').nullableKeys('ep0').append();
   schema().indexLabel('el2byep0Shard').onE('el2').by('ep0').shard().ifNotExist().create();
   schema().edgeLabel('el2').properties('ep6').nullableKeys('ep6').append();
   schema().indexLabel('el2byep6Shard').onE('el2').by('ep6').shard().ifNotExist().create();
   schema().edgeLabel('el2').properties('ep5').nullableKeys('ep5').append();
   schema().indexLabel('el2byep5Shard').onE('el2').by('ep5').shard().ifNotExist().create();
   ```
   - Data
   ```
   Vertex:
   g.addV('vl0').property('vp1','0.5955419').property('vp0','0.8441227912306933').property('vp2','182867451').property(T.id,701230294451093504)
   g.addV('vl0').property('vp1','0.030927777').property('vp0','0.15811197000651445').property('vp2','-1774039734').property('vp4','0.15811197000651445').property('vp6','-1826077902').property(T.id,701230294509813760)
   g.addV('vl0').property('vp1','0.9729499').property('vp2','2030399260').property('vp4','0.8418697950711984').property('vp6','-660038979').property(T.id,701230294539173888)
   g.addV('vl0').property('vp1','0.70119077').property('vp0','0.15811197000651445').property('vp2','-1295112053').property('vp4','0.6037576527787519').property(T.id,701230294572728320)
   g.addV('vl0').property('vp1','0.83885396').property('vp0','0.7566388111146612').property('vp2','-660038979').property('vp4','0.15811197000651445').property('vp6','182867451').property(T.id,701230294610477056)
   g.addV('vl0').property('vp0','-1.774039734E9').property('vp2','1327492548').property('vp4','0.5017301422106627').property('vp6','-660038979').property(T.id,701230294639837184)
   g.addV('vl0').property('vp4','0.21033403102542247').property(T.id,701230294665003008)
   g.addV('vl0').property('vp1','0.11220425').property('vp0','0.15811197000651445').property('vp4','0.6083243954171486').property('vp6','-1826077902').property(T.id,701230294690168832)
   g.addV('vl0').property('vp1','0.49904156').property('vp0','0.7726984864965903').property('vp2','-874981646').property('vp4','0.9525222806364477').property('vp6','-1433016180').property(T.id,701230294719528960)
   g.addV('vl0').property('vp1','0.82727903').property('vp6','1174319813').property(T.id,701230294744694784)
   Edge:
   g.V(701230294572728320).as('701230294572728320').V(701230294744694784).as('701230294744694784').addE('el1').from('701230294572728320').to('701230294744694784')
   g.V(701230294639837184).as('701230294639837184').V(701230294744694784).as('701230294744694784').addE('el2').from('701230294639837184').to('701230294744694784')
   g.V(701230294744694784).as('701230294744694784').V(701230294610477056).as('701230294610477056').addE('el0').from('701230294744694784').to('701230294610477056')
   g.V(701230294610477056).as('701230294610477056').V(701230294610477056).as('701230294610477056').addE('el2').from('701230294610477056').to('701230294610477056')
   g.V(701230294744694784).as('701230294744694784').V(701230294572728320).as('701230294572728320').addE('el2').from('701230294744694784').to('701230294572728320')
   g.V(701230294539173888).as('701230294539173888').V(701230294665003008).as('701230294665003008').addE('el2').from('701230294539173888').to('701230294665003008')
   g.V(701230294690168832).as('701230294690168832').V(701230294719528960).as('701230294719528960').addE('el2').from('701230294690168832').to('701230294719528960')
   g.V(701230294610477056).as('701230294610477056').V(701230294572728320).as('701230294572728320').addE('el0').from('701230294610477056').to('701230294572728320')
   g.V(701230294572728320).as('701230294572728320').V(701230294639837184).as('701230294639837184').addE('el1').from('701230294572728320').to('701230294639837184')
   g.V(701230294665003008).as('701230294665003008').V(701230294539173888).as('701230294539173888').addE('el1').from('701230294665003008').to('701230294539173888')
   g.V(701230294451093504).as('701230294451093504').V(701230294451093504).as('701230294451093504').addE('el1').from('701230294451093504').to('701230294451093504')
   g.V(701230294610477056).as('701230294610477056').V(701230294572728320).as('701230294572728320').addE('el1').from('701230294610477056').to('701230294572728320')
   g.V(701230294572728320).as('701230294572728320').V(701230294690168832).as('701230294690168832').addE('el1').from('701230294572728320').to('701230294690168832')
   g.V(701230294690168832).as('701230294690168832').V(701230294639837184).as('701230294639837184').addE('el0').from('701230294690168832').to('701230294639837184')
   g.V(701230294665003008).as('701230294665003008').V(701230294690168832).as('701230294690168832').addE('el2').from('701230294665003008').to('701230294690168832')
   g.V(701230294719528960).as('701230294719528960').V(701230294665003008).as('701230294665003008').addE('el0').from('701230294719528960').to('701230294665003008')
   g.V(701230294744694784).as('701230294744694784').V(701230294719528960).as('701230294719528960').addE('el1').from('701230294744694784').to('701230294719528960')
   g.V(701230294719528960).as('701230294719528960').V(701230294690168832).as('701230294690168832').addE('el1').from('701230294719528960').to('701230294690168832')
   g.V(701230294665003008).as('701230294665003008').V(701230294639837184).as('701230294639837184').addE('el2').from('701230294665003008').to('701230294639837184')
   g.V(701230294744694784).as('701230294744694784').V(701230294719528960).as('701230294719528960').addE('el0').from('701230294744694784').to('701230294719528960')
   
   ```


-- 
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: issues-unsubscribe@hugegraph.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org