Repository navigation
Description
ArcadeDB Version: 23.1.2
JDK Version: <brand and version here. You can find it in the 2nd line of the server output>
OS: Linux
Hello Luca,
Sorry for bothering you with a Gremlin issue again. The corresponding issue of Tinkerpop is available here for your reference.
I found that there is also a similar issue in ArcadeDB, and the result is inconsistent with TinkerGraph. Thus, I believe it may not only be an issue with the Gremlin language.
To be more specific, I have executed the following Gremlin statements, which produce different results for ArcadeDB (result 2) and TinkerGraph (result 2), and both results violate the test oracle.
(1) g.V().where(__.values("PersonalId").is(within(4,8,7,10,9,3))).count()
=> 6
(2) g.V().where(__.values("PersonalId").is(within(4,8,7,10,9,3))).has("prop4", gt(1)).count()
=> 1
(3) g.V().where(__.values("PersonalId").is(within(4,8,7,10,9,3))).not(__.has("prop4", gt(1))).count()
=> 4
# Query Partition => (1) should equals (2) + (3)
(4) g.V().where(__.values("PersonalId").is(within(4,8,7,10,9,3))).values("prop4")
=> {-3.5550649939662193e+18, 1.1868212582852746e+18, NaN}
(5) g.inject(-3.5550649939662193e+18, 1.1868212582852746e+18, Double.NaN).is(gt(1)).count()
=> 1
I tried to reduce a test case generated by my automated testing algorithm. However, it looks still a little complex TaT.
So I would appreciate your assistance in investigating and confirming whether or not there is a bug present. Thank you for your help.
Steps to reproduce
The graph is created as follows:
g.addV("Vlabel1").property("prop4", -2.2940462564994032e+17).property("prop30", "1VjYYDjUBPCI5pKd").property("prop2", 2.885236496196127e+18).property("prop27", -1.283089519858595e+18).property("prop28", -177934796716677957).property("prop11", Double.POSITIVE_INFINITY).property("prop7", Double.NaN).property("prop13", 1582080133).property("prop12", "ZfcpYP42sDhMoli").property("prop26", -369822694828473072).property("prop15", false).property("prop24", -2035481923).property("prop3", -8.101739153023826e+17).property("prop18", -8647655841519618606).property("prop17", Double.NEGATIVE_INFINITY).property("prop21", "9WXEq").property("prop5", 7015971082047412708).property("prop23", false).property("prop16", -2545300721734184124).property("prop8", false).property("prop9", Double.NEGATIVE_INFINITY).property("prop19", -1148359097).property("prop10", 707520215).property("prop29", 8230830081810437976).property("prop20", 3.8750319078997024e+17).property("prop14", 4460313502400034603).property("prop22", Double.NaN).property("PersonalId", 1)
g.addV("Vlabel2").property("prop13", 844274909).property("prop14", -1075402369199667167).property("PersonalId", 2)
g.addV("Vlabel3").property("prop7", 1.882109465594965e+18).property("prop15", false).property("prop4", -3.5550649939662193e+18).property("prop9", Double.POSITIVE_INFINITY).property("prop17", Double.NEGATIVE_INFINITY).property("prop24", 1755404150).property("prop21", "i4zl5FELCSxw977").property("prop13", 837413089).property("prop27", Double.NaN).property("prop12", "qihyjdv4ac").property("prop2", Double.NEGATIVE_INFINITY).property("prop22", Double.POSITIVE_INFINITY).property("prop11", -1.2786380272506816e+18).property("prop20", 1.69612491533634e+18).property("prop30", "IxJp6GCr5FRvbvpm6ua").property("prop29", -7960090835127371110).property("prop25", true).property("prop18", 1839549868490228748).property("prop16", -5686358023541700304).property("prop5", 5956272628376797503).property("prop19", -1735914445).property("prop23", true).property("prop1", Double.POSITIVE_INFINITY).property("prop3", -2.871901232555182e+16).property("prop26", 7437263094806337639).property("prop8", false).property("PersonalId", 3)
g.addV("Vlabel4").property("prop3", 1.5543717370352646e+17).property("prop18", -7149746309261129994).property("prop24", -320785419).property("prop2", -1.3058283314253888e+18).property("prop1", -1.0673961612545854e+17).property("prop10", -601759324).property("prop16", -2436094159597901640).property("prop8", false).property("prop30", "gtrb5gw").property("prop26", 3672383367334424219).property("prop28", 7777478907755955172).property("prop12", "w6ursX930r2Y7r").property("prop27", 6.736691901333204e+17).property("prop6", -5129032340661124781).property("prop9", Double.POSITIVE_INFINITY).property("prop15", true).property("prop23", true).property("prop29", 3775213037193570604).property("prop19", 434486748).property("prop13", -1813611800).property("prop22", Double.POSITIVE_INFINITY).property("prop5", 6634760243334332508).property("prop11", Double.NaN).property("prop7", 1.265249695254938e+18).property("prop17", Double.NEGATIVE_INFINITY).property("prop21", "0ed7O").property("prop20", Double.POSITIVE_INFINITY).property("PersonalId", 4)
g.addV("Vlabel5").property("prop12", "S").property("prop21", "MM5E1xt8YHFLFvyAWTX").property("prop3", Double.NEGATIVE_INFINITY).property("prop13", 1746305436).property("prop4", 1.3135070042619139e+18).property("prop30", "RLqWeKWcuSl").property("prop22", Double.POSITIVE_INFINITY).property("prop2", Double.NaN).property("prop15", true).property("prop24", 552313691).property("prop7", -3.3599971543876746e+18).property("prop18", -5095086476557314857).property("prop14", 8921765190220594413).property("prop11", -2.6420198634220063e+18).property("prop25", false).property("PersonalId", 5)
g.addV("Vlabel1").property("prop4", Double.POSITIVE_INFINITY).property("prop30", "c2M").property("prop2", 1.7324816497729152e+17).property("prop27", -2.185674464043821e+18).property("prop28", 1159251342304082609).property("prop11", Double.POSITIVE_INFINITY).property("prop7", -5.182901110025472e+18).property("prop13", 234292042).property("prop12", "SaWqxps2al63pCp02vAS").property("prop26", -4736755777493897942).property("prop15", false).property("prop24", 100963346).property("prop3", Double.NEGATIVE_INFINITY).property("prop18", 6912521101796894542).property("prop17", -6.670160216544278e+18).property("prop21", "j").property("prop5", 2578099723248037195).property("prop23", true).property("prop16", -1418451100090988273).property("prop8", false).property("prop9", 6.374520624934052e+18).property("prop19", -2006124721).property("prop10", 1657391968).property("prop29", -4269616347049342302).property("prop20", Double.NEGATIVE_INFINITY).property("prop14", -2642068678169566420).property("prop22", -1.3298327320087598e+18).property("PersonalId", 6)
g.addV("Vlabel1").property("prop4", 1.1868212582852746e+18).property("prop30", "1Elx5x").property("prop2", Double.NEGATIVE_INFINITY).property("prop27", 5.605767437117183e+18).property("prop28", -7693670674622739862).property("prop11", Double.NaN).property("prop7", Double.NEGATIVE_INFINITY).property("prop13", -1369118281).property("prop12", "LxmuZ45gQTP1g").property("prop26", 1545145213690973092).property("prop15", false).property("prop24", 2058324403).property("prop3", -1.3892436722001692e+18).property("prop18", 8384102315671323497).property("prop17", Double.POSITIVE_INFINITY).property("prop21", "SuUcQkd").property("prop5", -5840641462162349575).property("prop23", false).property("prop16", -373612337788034933).property("prop8", false).property("prop9", 4.377517405735546e+17).property("prop19", -952377156).property("prop10", 2015338868).property("prop29", -7703777183281988600).property("prop20", -2.907451125822664e+17).property("prop14", -907244626449521625).property("prop22", Double.POSITIVE_INFINITY).property("PersonalId", 7)
g.addV("Vlabel2").property("prop13", -42835942).property("prop14", -6932243310380796553).property("PersonalId", 8)
g.addV("Vlabel1").property("prop4", Double.NaN).property("prop30", "t4FQn").property("prop2", -1.465384380686794e+18).property("prop27", Double.POSITIVE_INFINITY).property("prop28", -3055335757527325915).property("prop11", 2.355517892187534e+18).property("prop7", Double.NEGATIVE_INFINITY).property("prop13", 17168169).property("prop12", "zkSLx").property("prop26", 4445675096817807122).property("prop15", true).property("prop24", -460755716).property("prop3", Double.NEGATIVE_INFINITY).property("prop18", 8069491932740522890).property("prop17", -6.474951438805894e+18).property("prop21", "bzgk").property("prop5", 4752813751152326051).property("prop23", false).property("prop16", -5093561898981172183).property("prop8", false).property("prop9", Double.NEGATIVE_INFINITY).property("prop19", -1168771019).property("prop10", 15403729).property("prop29", 7507396478008981274).property("prop20", Double.NEGATIVE_INFINITY).property("prop14", 5825323407811670644).property("prop22", 2.213534445163813e+18).property("PersonalId", 9)
g.addV("Vlabel4").property("prop3", -4.0775648214210437e+18).property("prop18", -7971710687865750570).property("prop24", -1663016249).property("prop2", -5.655552238083623e+18).property("prop1", 4.288946496060585e+18).property("prop10", 837910911).property("prop16", -9210971577165889374).property("prop8", false).property("prop30", "lnDEbJBVG4k9Uih9").property("prop26", -2089244312525253385).property("prop28", 7166774806126499058).property("prop12", "sicAcWZpoWcuEva").property("prop27", Double.NEGATIVE_INFINITY).property("prop6", -7815504760223285253).property("prop9", Double.POSITIVE_INFINITY).property("prop15", true).property("prop23", true).property("prop29", 8466219054223735675).property("prop19", -1569784833).property("prop13", 655849681).property("prop22", Double.POSITIVE_INFINITY).property("prop5", 3320586504991827443).property("prop11", -5.813881114119375e+17).property("prop7", Double.NEGATIVE_INFINITY).property("prop17", Double.POSITIVE_INFINITY).property("prop21", "YrN9jD9lwoSfqZs6N").property("prop20", Double.NEGATIVE_INFINITY).property("PersonalId", 10)
g.addE("Elabel3").from(__.V().where(__.values("PersonalId").is(eq(6)))).to(__.V().where(__.values("PersonalId").is(eq(6)))).property("prop1", Double.NEGATIVE_INFINITY).property("prop13", 1395477266).property("prop17", Double.NaN).property("prop26", -3175131270691598539).property("prop23", false).property("prop25", true).property("prop8", false).property("prop20", Double.NEGATIVE_INFINITY).property("prop16", 8580062350103286674).property("prop6", 271884049054174068).property("prop7", Double.NEGATIVE_INFINITY).property("prop19", 2122897479).property("prop27", -7.83421500759662e+16).property("prop15", true).property("prop4", Double.NEGATIVE_INFINITY).property("prop2", 4.981045476279219e+18).property("prop30", "1rLZjdgp5dSq4").property("prop29", -4073388135151687355).property("prop9", Double.POSITIVE_INFINITY).property("prop5", -853120244649295999).property("prop14", -6336872667973287622).property("PersonalId", 1)
g.addE("Elabel1").from(__.V().where(__.values("PersonalId").is(eq(10)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop30", "YKVkHp").property("prop8", false).property("prop17", Double.POSITIVE_INFINITY).property("prop26", 1126891973866305505).property("prop9", Double.POSITIVE_INFINITY).property("prop6", 6773585601694945377).property("prop13", 534877282).property("prop20", Double.NaN).property("prop21", "XNWUQs48k2jTzawgbOu").property("prop5", -7906468193044291844).property("prop4", 2.073344009912819e+16).property("prop29", 6982409224681664646).property("prop22", Double.NEGATIVE_INFINITY).property("prop25", true).property("prop15", false).property("prop27", Double.NaN).property("prop2", Double.NEGATIVE_INFINITY).property("prop7", -1.304968967433848e+18).property("prop16", -8598096316560481061).property("prop10", 2140208520).property("prop23", true).property("prop18", -6388675265611021194).property("prop19", 136625689).property("prop28", -6945453538407760146).property("prop24", 2114614702).property("prop14", 6744958750589396919).property("prop1", Double.NEGATIVE_INFINITY).property("PersonalId", 2)
g.addE("Elabel3").from(__.V().where(__.values("PersonalId").is(eq(1)))).to(__.V().where(__.values("PersonalId").is(eq(9)))).property("prop1", 1.861037355969517e+17).property("prop13", 131575046).property("prop17", -3.079460380333276e+17).property("prop26", 7842776133813562801).property("prop23", true).property("prop25", true).property("prop8", true).property("prop20", Double.NaN).property("prop16", 8396696792035259203).property("prop6", -3825008177251012439).property("prop7", Double.NaN).property("prop19", -584729583).property("prop27", Double.NEGATIVE_INFINITY).property("prop15", true).property("prop4", 1.9597058992343667e+18).property("prop2", Double.POSITIVE_INFINITY).property("prop30", "cBZfJgrNXartP3uH8IQ").property("prop29", 830477101109659436).property("prop9", -1.6297346187138954e+18).property("prop5", -1627824989415734558).property("prop14", 7324335747936652666).property("PersonalId", 3)
g.addE("Elabel5").from(__.V().where(__.values("PersonalId").is(eq(10)))).to(__.V().where(__.values("PersonalId").is(eq(5)))).property("prop2", Double.POSITIVE_INFINITY).property("prop18", -1103138278587933909).property("prop11", 1.1734776820226685e+18).property("prop23", true).property("prop12", "W4Yv8MfJfRl1gCsJ").property("prop26", -3617499041735089471).property("PersonalId", 4)
g.addE("Elabel7").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(1)))).property("prop18", 4812044418089938269).property("prop1", Double.NaN).property("prop25", false).property("prop29", -1386647136326556500).property("prop8", true).property("prop24", 1782363619).property("prop14", -5836381593725454738).property("prop7", Double.POSITIVE_INFINITY).property("prop15", false).property("prop26", -4618284001018728852).property("prop30", "0w").property("prop20", Double.NEGATIVE_INFINITY).property("prop5", 2866846715913013000).property("PersonalId", 5)
g.addE("Elabel1").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop30", "Osmx1Pu379LUHNG").property("prop8", true).property("prop17", -5.16228958454921e+18).property("prop26", -2110544006206955802).property("prop9", 3.6802283839303316e+18).property("prop6", 5737843508275844313).property("prop13", -1195475005).property("prop20", -2.8203696060455485e+18).property("prop21", "aLOtvz7").property("prop5", 5618450803852875628).property("prop4", -2.9298092539839626e+18).property("prop29", 16309530616101207).property("prop22", 6.198831583571542e+17).property("prop25", false).property("prop15", true).property("prop27", Double.NaN).property("prop2", 1.5130178987563402e+17).property("prop7", 3.8384588508700486e+17).property("prop16", -9162466833688803823).property("prop10", 2122497343).property("prop23", true).property("prop18", -4601948036282637620).property("prop19", 64973225).property("prop28", -6791429569291825582).property("prop24", 1090710688).property("prop14", 3846764937215482909).property("prop1", -2.9225676957766753e+18).property("PersonalId", 6)
g.addE("Elabel2").from(__.V().where(__.values("PersonalId").is(eq(3)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop13", 1296962469).property("PersonalId", 7)
g.addE("Elabel3").from(__.V().where(__.values("PersonalId").is(eq(9)))).to(__.V().where(__.values("PersonalId").is(eq(1)))).property("prop1", Double.POSITIVE_INFINITY).property("prop13", -682771189).property("prop17", -6.584908514457201e+18).property("prop26", -5153980319823046727).property("prop23", false).property("prop25", false).property("prop8", false).property("prop20", Double.NEGATIVE_INFINITY).property("prop16", -7961611757811590778).property("prop6", -4751829838767867121).property("prop7", -2.900254530988165e+18).property("prop19", 1291575334).property("prop27", 1.8339827994290342e+18).property("prop15", false).property("prop4", Double.NaN).property("prop2", Double.NEGATIVE_INFINITY).property("prop30", "VmtH").property("prop29", -7575427973202872072).property("prop9", -7.321013733223446e+16).property("prop5", -1317848893090447012).property("prop14", 8157027342853301426).property("PersonalId", 8)
g.addE("Elabel5").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(5)))).property("prop2", 1.330451828044843e+18).property("prop18", -5416050561063484113).property("prop11", 2.2925231775552774e+17).property("prop23", false).property("prop12", "WT1").property("prop26", 6272616730050573807).property("PersonalId", 9)
g.addE("Elabel3").from(__.V().where(__.values("PersonalId").is(eq(1)))).to(__.V().where(__.values("PersonalId").is(eq(6)))).property("prop1", Double.NaN).property("prop13", 3053409).property("prop17", -2.6325095840745815e+18).property("prop26", 6731725247105789561).property("prop23", false).property("prop25", true).property("prop8", true).property("prop20", 2.5337799145190106e+17).property("prop16", -4972205137210439629).property("prop6", 2017659832813598580).property("prop7", Double.NaN).property("prop19", -1090923355).property("prop27", -2.1718287241350172e+18).property("prop15", false).property("prop4", Double.POSITIVE_INFINITY).property("prop2", Double.NEGATIVE_INFINITY).property("prop30", "O7MCaIAGHrudyuQH").property("prop29", 4047868835130826923).property("prop9", Double.POSITIVE_INFINITY).property("prop5", 493509259244957683).property("prop14", 7909033290503257678).property("PersonalId", 10)
g.addE("Elabel5").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(5)))).property("prop2", Double.POSITIVE_INFINITY).property("prop18", 5145583469944371735).property("prop11", -1.190041344537106e+18).property("prop23", true).property("prop12", "BurLAeHb3y9cNkF03K").property("prop26", -4377467529541432826).property("PersonalId", 11)
g.addE("Elabel4").from(__.V().where(__.values("PersonalId").is(eq(1)))).to(__.V().where(__.values("PersonalId").is(eq(10)))).property("prop16", 5734233169409016883).property("prop14", 2487190253195950727).property("prop10", -1071378428).property("prop4", 5.706898683561908e+17).property("prop20", 2.0865622959281606e+17).property("prop6", 4260364245490223153).property("prop8", false).property("prop18", 1258730366489195042).property("prop26", -4283281786876571628).property("prop1", Double.POSITIVE_INFINITY).property("prop28", 7964415772687620485).property("prop17", Double.NEGATIVE_INFINITY).property("prop19", 1020154510).property("prop22", 2.175528799228725e+18).property("prop11", -7.537550392590898e+17).property("prop15", false).property("prop29", 6610696183247211124).property("prop7", Double.NaN).property("prop5", 6914020346061443268).property("prop2", Double.POSITIVE_INFINITY).property("prop12", "Qu").property("prop13", -1525367322).property("prop21", "04rg8PmWT9g2tgMzEH").property("prop25", true).property("prop9", Double.NaN).property("prop27", Double.NEGATIVE_INFINITY).property("prop23", false).property("prop24", -993005328).property("prop3", Double.POSITIVE_INFINITY).property("PersonalId", 12)
g.addE("Elabel4").from(__.V().where(__.values("PersonalId").is(eq(9)))).to(__.V().where(__.values("PersonalId").is(eq(10)))).property("prop16", -1911175121426203661).property("prop14", 545157901138081002).property("prop10", 1206818750).property("prop4", 6.421010988093935e+17).property("prop20", 9.590819095010997e+16).property("prop6", 6140442115802967298).property("prop8", true).property("prop18", 1822271658223792801).property("prop26", -708075078385724469).property("prop1", 2.5883566067149853e+17).property("prop28", -5334231718321055025).property("prop17", 8.80302807812771e+18).property("prop19", 2055591028).property("prop22", Double.NEGATIVE_INFINITY).property("prop11", -5.781499530130947e+18).property("prop15", false).property("prop29", 5275542065028151356).property("prop7", Double.NaN).property("prop5", -8586829215891374274).property("prop2", -2.040932413100745e+17).property("prop12", "LiwkvhlkKEieb").property("prop13", 1309407868).property("prop21", "wlN6YlKk").property("prop25", false).property("prop9", 9.922052647000215e+17).property("prop27", 5.651477287489111e+18).property("prop23", false).property("prop24", 2092938244).property("prop3", 5.739461810684296e+18).property("PersonalId", 13)
g.addE("Elabel10").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop2", 1.0844959566401304e+18).property("prop4", 7.494302257506339e+17).property("prop3", Double.POSITIVE_INFINITY).property("prop15", false).property("prop7", Double.POSITIVE_INFINITY).property("prop30", "JM46YA").property("prop18", -732400006827438134).property("prop21", "Hesb").property("prop13", 2043435206).property("prop24", 13384478).property("prop11", 5.112416955888318e+18).property("prop14", -5742670355734297474).property("prop9", 1.6894586258688259e+18).property("prop16", -3656736183042558190).property("prop23", false).property("prop6", -5503313277680533622).property("prop25", true).property("prop19", -1547258745).property("prop1", Double.NEGATIVE_INFINITY).property("prop12", "w2LCr04ov").property("prop20", -4.3002809043728527e+18).property("prop8", false).property("prop17", -1.8221027076745053e+17).property("prop27", -2.646198079983606e+18).property("prop22", -5.805853265336454e+18).property("prop10", 1838351437).property("prop28", 1255386205585676587).property("prop29", 7038825691277784600).property("PersonalId", 14)
g.addE("Elabel1").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop30", "dk").property("prop8", true).property("prop17", Double.NaN).property("prop26", -7007500950269977911).property("prop9", 7.214429362721204e+17).property("prop6", -4042845408660548570).property("prop13", 711653440).property("prop20", -8.26047631748596e+17).property("prop21", "fyLbfaQmJ").property("prop5", -591448866759264725).property("prop4", -6.908421778535419e+18).property("prop29", 4970474164325965149).property("prop22", 1.2124824903887695e+18).property("prop25", false).property("prop15", false).property("prop27", Double.NaN).property("prop2", Double.NaN).property("prop7", Double.POSITIVE_INFINITY).property("prop16", 1300018716350960030).property("prop10", 710833294).property("prop23", true).property("prop18", 6536720208374507515).property("prop19", 1176573313).property("prop28", 80027253072486761).property("prop24", -793681886).property("prop14", 6330311020187829226).property("prop1", -3.45544697320206e+18).property("PersonalId", 15)
g.addE("Elabel1").from(__.V().where(__.values("PersonalId").is(eq(10)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop30", "8vmnkEhJg99UOS").property("prop8", false).property("prop17", Double.NaN).property("prop26", 9134051595329552692).property("prop9", -1.881491069219882e+18).property("prop6", -6402878619763684215).property("prop13", 285880013).property("prop20", Double.NaN).property("prop21", "x").property("prop5", 5994143475892830351).property("prop4", Double.POSITIVE_INFINITY).property("prop29", 4003864187429994160).property("prop22", Double.POSITIVE_INFINITY).property("prop25", true).property("prop15", true).property("prop27", -5.97407180657491e+18).property("prop2", 1.3650774392300662e+18).property("prop7", 3.333084969667046e+17).property("prop16", 5789698165388777358).property("prop10", 861293040).property("prop23", true).property("prop18", 3299638632766644427).property("prop19", 766001679).property("prop28", -5071563949921774497).property("prop24", -1183246505).property("prop14", -7375459169115368849).property("prop1", -3.268885256478367e+18).property("PersonalId", 16)
g.addE("Elabel9").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(4)))).property("prop9", 6.86440687732076e+18).property("prop30", "GlVOU57c9vxI76bEIEJt").property("prop10", -1474044268).property("prop5", -3427283700507323868).property("prop6", -3781611271578750097).property("prop7", 1.0692439786261747e+18).property("prop8", false).property("prop18", 1859202206019271697).property("prop23", true).property("prop27", -1.1476498931305202e+18).property("prop14", 5702769294727649758).property("PersonalId", 17)
g.addE("Elabel5").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(5)))).property("prop2", Double.POSITIVE_INFINITY).property("prop18", -8759341681604249586).property("prop11", Double.NEGATIVE_INFINITY).property("prop23", false).property("prop12", "7n5YBjzB").property("prop26", 1026205113547403565).property("PersonalId", 18)
g.addE("Elabel9").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(10)))).property("prop9", 2.0437053284055916e+18).property("prop30", "GDOx64MiSQVCU8R").property("prop10", 1958852991).property("prop5", -3106420813606062937).property("prop6", -4202599160493268984).property("prop7", Double.POSITIVE_INFINITY).property("prop8", true).property("prop18", -5309730011784776733).property("prop23", false).property("prop27", -3.317293901243361e+16).property("prop14", 2431161757492778590).property("PersonalId", 19)
g.addE("Elabel4").from(__.V().where(__.values("PersonalId").is(eq(7)))).to(__.V().where(__.values("PersonalId").is(eq(10)))).property("prop16", 8194078798874399303).property("prop14", 6114073896259437936).property("prop10", 491451081).property("prop4", Double.NaN).property("prop20", Double.POSITIVE_INFINITY).property("prop6", 3396117719595053843).property("prop8", true).property("prop18", -7129192162693434640).property("prop26", -6713590110021162396).property("prop1", -3.538756994638302e+18).property("prop28", -3201179686262610496).property("prop17", Double.NEGATIVE_INFINITY).property("prop19", -1974766865).property("prop22", Double.POSITIVE_INFINITY).property("prop11", Double.NEGATIVE_INFINITY).property("prop15", true).property("prop29", -5650796277332366054).property("prop7", Double.POSITIVE_INFINITY).property("prop5", -8068044415055774696).property("prop2", Double.NaN).property("prop12", "mrVQkoS9dCE").property("prop13", -2065471229).property("prop21", "kpkCxs0").property("prop25", true).property("prop9", 2.0725272516582e+18).property("prop27", 2.3251483278417004e+18).property("prop23", true).property("prop24", 1530208205).property("prop3", -3.5708583237464704e+18).property("PersonalId", 20)
g.addE("Elabel9").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(4)))).property("prop9", -1.7936859935581862e+18).property("prop30", "N8lUdfc0y2jxiES").property("prop10", -1324502387).property("prop5", -447378968758755882).property("prop6", 7497752762637781533).property("prop7", Double.NEGATIVE_INFINITY).property("prop8", false).property("prop18", -833338965619354705).property("prop23", true).property("prop27", -2.1652557056569892e+18).property("prop14", -4161582701552256380).property("PersonalId", 21)
g.addE("Elabel5").from(__.V().where(__.values("PersonalId").is(eq(4)))).to(__.V().where(__.values("PersonalId").is(eq(5)))).property("prop2", Double.NaN).property("prop18", -1691385709912750587).property("prop11", -5.404510434100509e+18).property("prop23", true).property("prop12", "oXzNOdgpyDhW75Uni9H").property("prop26", 1229116801939650331).property("PersonalId", 22)
g.addE("Elabel8").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(8)))).property("prop10", 234929793).property("prop11", Double.NaN).property("prop2", Double.NEGATIVE_INFINITY).property("prop13", -1798052965).property("prop28", -8906134688900667369).property("prop1", Double.NaN).property("prop24", 1688468276).property("prop27", Double.POSITIVE_INFINITY).property("prop25", true).property("prop30", "23E").property("prop17", Double.POSITIVE_INFINITY).property("prop16", -5130875174832476816).property("prop23", true).property("prop7", -2.8672524090182124e+18).property("prop22", Double.POSITIVE_INFINITY).property("prop5", -1931339350105480204).property("prop29", -6128714266573571694).property("prop18", 8551902245422253).property("prop12", "DM1gdvaN0hIHQ8xf5wij").property("prop4", Double.NaN).property("prop19", 660594147).property("prop8", false).property("prop3", -1.5291588123924959e+18).property("prop9", Double.NEGATIVE_INFINITY).property("prop14", 93742307319111750).property("prop6", 5512581122716751695).property("prop15", false).property("PersonalId", 23)
g.addE("Elabel6").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop21", "7inLKgECtsxsI").property("prop11", Double.NaN).property("prop23", true).property("prop6", -4237116245734034703).property("prop20", Double.NaN).property("prop5", 3487709760297786220).property("prop9", 2.6711164522873324e+18).property("prop22", 2.1916956664865682e+18).property("PersonalId", 24)
g.addE("Elabel2").from(__.V().where(__.values("PersonalId").is(eq(3)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop13", 231876508).property("PersonalId", 25)
g.addE("Elabel3").from(__.V().where(__.values("PersonalId").is(eq(9)))).to(__.V().where(__.values("PersonalId").is(eq(6)))).property("prop1", Double.POSITIVE_INFINITY).property("prop13", -1923104108).property("prop17", Double.NaN).property("prop26", 5365248501746952713).property("prop23", false).property("prop25", false).property("prop8", false).property("prop20", 1.4929477022793748e+18).property("prop16", 5970479097423162700).property("prop6", 7622326803074198431).property("prop7", -2.4051904652505487e+18).property("prop19", 168721841).property("prop27", 1.8427237374837988e+18).property("prop15", false).property("prop4", -1.7984815153954208e+17).property("prop2", Double.POSITIVE_INFINITY).property("prop30", "SuDkWrTbr").property("prop29", 5767119265952484822).property("prop9", -3.2510031326323907e+18).property("prop5", 5666136571236155240).property("prop14", 7695995045033557098).property("PersonalId", 26)
g.addE("Elabel9").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(4)))).property("prop9", -1.2535768767396826e+18).property("prop30", "5LVFDi4joYzg9").property("prop10", -1084772631).property("prop5", 1593251351038626241).property("prop6", 6307076132962090900).property("prop7", Double.POSITIVE_INFINITY).property("prop8", true).property("prop18", -2578045024970787999).property("prop23", true).property("prop27", Double.NaN).property("prop14", -8655544007933282238).property("PersonalId", 27)
g.addE("Elabel6").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(3)))).property("prop21", "KD2R4DpmhbvSydM").property("prop11", Double.NaN).property("prop23", true).property("prop6", -5606162063169252886).property("prop20", -4.484255748709267e+18).property("prop5", 7754780542876017284).property("prop9", -1.5546440935184787e+17).property("prop22", Double.NEGATIVE_INFINITY).property("PersonalId", 28)
g.addE("Elabel8").from(__.V().where(__.values("PersonalId").is(eq(5)))).to(__.V().where(__.values("PersonalId").is(eq(2)))).property("prop10", 661189710).property("prop11", Double.POSITIVE_INFINITY).property("prop2", Double.NEGATIVE_INFINITY).property("prop13", 691197381).property("prop28", -1149108745251719013).property("prop1", 1.0710664994308355e+18).property("prop24", -1425562386).property("prop27", 2.943082490874493e+17).property("prop25", true).property("prop30", "U9LXY3HfCUgZxPdP7zi").property("prop17", Double.POSITIVE_INFINITY).property("prop16", 702331953873820254).property("prop23", true).property("prop7", -5.807980532257455e+18).property("prop22", Double.NEGATIVE_INFINITY).property("prop5", -3546424897235337104).property("prop29", -956469604668883085).property("prop18", 1491130452840723157).property("prop12", "bP85BPnoDSCMg").property("prop4", Double.NEGATIVE_INFINITY).property("prop19", -800256876).property("prop8", true).property("prop3", -3.0438642521127265e+18).property("prop9", Double.NaN).property("prop14", -5887046504354050879).property("prop6", 439934838329421464).property("prop15", false).property("PersonalId", 29)
g.addE("Elabel4").from(__.V().where(__.values("PersonalId").is(eq(7)))).to(__.V().where(__.values("PersonalId").is(eq(4)))).property("prop16", 7275204627235779852).property("prop14", 85385043869512000).property("prop10", -974171319).property("prop4", Double.POSITIVE_INFINITY).property("prop20", 1.6804654209150108e+18).property("prop6", 4644287215491431723).property("prop8", false).property("prop18", 4495791830722854373).property("prop26", 5853850592336198973).property("prop1", 3.374450186880508e+18).property("prop28", -1738164754261716000).property("prop17", -2.077086263692045e+17).property("prop19", 670197600).property("prop22", Double.NEGATIVE_INFINITY).property("prop11", Double.NEGATIVE_INFINITY).property("prop15", true).property("prop29", 5627047867258942536).property("prop7", -3.31171575169098e+18).property("prop5", -1870578149342021307).property("prop2", Double.NaN).property("prop12", "6uoAeEXEz1lO").property("prop13", 1311992396).property("prop21", "l2foPwiX1Xmu6w69kWs").property("prop25", false).property("prop9", Double.NEGATIVE_INFINITY).property("prop27", -1.9195266082780152e+18).property("prop23", false).property("prop24", 974877438).property("prop3", -4.781929503040375e+18).property("PersonalId", 30)
Activity
lvca commentedon Mar 14, 2023
Just to clarify, from your description the issue is that
Double.NaNis not considered greater than 1?joyemang33 commentedon Mar 14, 2023
Thanks for your response. I agree with you, Double.NaN is not considered greater or less than 1. Thus the boolean of
NaN > 1andNaN < 1are both False.And I found a much simpler way to reproduce the issue from it.
The result should be$1$ since The not()-step (filter) removes objects from the traversal stream when the traversal provided as an argument returns an object. according to Gremlin Document.
And I found that if I do not use has(key, predicate) to implement it, ArcadeDB can return the correct result:
However, the simpler case will cause GremlinTypeErrorException in TinkerGraph. I guess they have other issues with these Gremlin queries TaT.
joyemang33 commentedon Mar 14, 2023
I tried these cases in JanusGraph and OrientDB just now and JanusGraph can return the correct result.
So I think it is not only a Gremlin issue = =
It would be highly appreciated if you help confirm it and identify the root cause.
lvca commentedon Mar 14, 2023
I was able to reproduce it and internally we also got a GremlinTypeErrorException exception, but it was swallowed.
The issue is in the Gremlin library (class org.apache.tinkerpop.gremlin.util.GremlinValueComparator):
By design, Gremlin does not allow comparison with NaN. You will find the same issue in all the Gremlin implementations.
joyemang33 commentedon Mar 14, 2023
Many thanks for your help! And I also comment it on Jira
I think sometimes TinkerGraph will also swallow the exceptions. But I am still curious as to why OrientDB and JanusGraph are able to return the same results as using
where. I will try to contact their developers to further investigate it.Would you want to raise the exception or return the same result as
wherein the future?lvca commentedon Mar 14, 2023
What version of JanusGraph did you test? It's possible this check was not implemented.
joyemang33 commentedon Mar 14, 2023
I tried 0.6.3, the latest version, and I tried OrientDB in the version of orientdb-tp3-3.2.16
Cole-Greer commentedon Apr 12, 2023
Hi @joyemang33, I wanted to jump in here quickly and add a bit more context to your simplified example. As of 3.6, TinkerPop uses these rules for boolean logic. When evaluating
The NaN > 1 comparison that the has step does returns a state of
Errorwhich is signaled byGremlinTypeErrorException. This Error state gets passed into the not step. Not(Error) itself evaluates to Error. The idea here is that since NaN>1 is not computable, not(NaN>1) is also not computable.This Error state eventually gets reduced to False and the offending vertex is filtered out.
The significant difference in your second traversal is actually the use of the where step. The where step (when provided a traversal) is defined as a BinaryReductionStep, meaning that it is a fixed point where Error boolean states will always be reduced to False. So in essence
g.V().not(__.has('prop1', gt(1))).count()amounts tonot(Error)andg.V().not(__.where(__.values('prop1').is(gt(1)))).count()amounts tonot(False).I don't know any of the reasoning why the where step specifically is defined as a BinaryReductionStep. If I find any additional context to this I will update this later.
joyemang33 commentedon Apr 12, 2023
Hi @Cole-Greer , @lvca.
Thank you very much for providing valuable information here and jira on this issue to make GDBMS more reliable, and sorry for any inconvenience caused by the complex original test case generated by our automated testing approach.
I now understand the different behavior of these steps, and I think the possible reason why JanusGraph and OrientDB produce the correct result is that they disabled TinkerGraphStepStrategy in their design.
It looks like ArcadeDB can solve the issue now in this way.
If you need further information about test cases and the testing approach, please contact us at any time.
lvca commentedon Apr 12, 2023
I see from this comment https://github.com/apache/tinkerpop/pull/2017/files#r1164155904, it could be better checking not the root, but if it is a value expression?
Cole-Greer commentedon Apr 13, 2023
I'm afraid we may have opened up pandora's box here by poking too deeply at the question "When should the reduction from Error to false take place?"
To pick up where I left off in my last comment, the
whereing.V().not(__.where(__.values('prop1').is(gt(1)))).count()should not be a reduction step. In order to align with the reference docs, the error should be propagated to the parentnotstep. I've updated my TinkerPop PR to address this although some iteration on it may still be required to ensure the semantics are correct.chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from…
chore(deps): bump uuid and testcontainers in /e2e-js [skip ci]
chore(deps): bump org.apache.maven.plugins:maven-compiler-plugin from…
chore(deps): bump uuid and testcontainers in /e2e-js [skip ci]
chore(deps): update testcontainers requirement from >=4.13.3 to >=4.1…
chore(studio-deps-dev)(deps-dev): bump browserslist from 4.28.2 to 4.…