GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [BUG] Merged query using logical operator OR returns false results · Issue #930 · ArcadeData/arcadedb

[BUG] Merged query using logical operator OR returns false results #930

New issue
Copy link
New issue
Copy link
Closed
Closed
[BUG] Merged query using logical operator OR returns false results#930
Copy link
Assignees
lvca
Labels
invalidThis doesn't seem rightwontfixThis will not be worked on
Milestone
23.3.1

Description

@llooFlashooll
llooFlashooll
opened on Mar 10, 2023
Issue body actions

We discovered a bug that Syntax error using logical operator AND.

  • 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 OR logical operator into a new query Q3. Based on the OR calculation. The Q3 query result set should be the union 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('el2','el3').inV().where(__.where(__.count())) returns [#74:238, #74:238, #74:238, #77:236, #77:236, #80:236, #80:236, #80:236, #80:236]
  2. g.V().both('el0').both('el0','el1','el4').and(__.count()) returns [#161:276, #164:276, #167:275, #170:275, #182:273, #74:238, #77:236]
  3. g.V().or(outE('el2','el3').inV().where(__.where(__.count())),both('el0').both('el0','el1','el4').and(__.count())) returns [#161:276, #164:276, #167:275, #173:275, #74:238, #77:236, #80:236]

We calculate the union result set of Q1 and Q2, which is [#161:276, #164:276, #167:275, #170:275, #182:273, #74:238, #77:236, #80:236, #80:236, #80:236, #80:236].
The union result set doesn't equal to Q3 result set.

Actual behavior:

The union 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. This might be a duplicate but the query and logical operator is different so I reported it just 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','0.13892778325611876').property('vp2','-1645104889').property(T.id,#179:274)
g.addV('vl0').property('vp2','339251985').property(T.id,#182:273)
g.addV('vl1').property('vp1',''339251985'').property(T.id,#74:238)
g.addV('vl1').property('vp1',''gh_{O'').property('vp0','0.13366516135043682').property(T.id,#77:236)
g.addV('vl0').property('vp0','0.23033260942005307').property(T.id,#161:276)
g.addV('vl0').property('vp0','0.16477119885063363').property('vp2','339251985').property(T.id,#164:276)
g.addV('vl1').property('vp1',''T})Rl'').property('vp0','0.24647997728789628').property(T.id,#80:236)
g.addV('vl0').property('vp0','0.13892778325611876').property('vp2','339251985').property(T.id,#167:275)
g.addV('vl0').property('vp0','0.2428712548430111').property(T.id,#170:275)
g.addV('vl0').property('vp0','0.3804590941821774').property('vp2','339251985').property(T.id,#173:275)

Edge:
g.V(#80:236).as('#80:236').V(#80:236).as('#80:236').addE('el3').from('#80:236').to('#80:236')
g.V(#80:236).as('#80:236').V(#164:276).as('#164:276').addE('el2').from('#80:236').to('#164:276')
g.V(#77:236).as('#77:236').V(#74:238).as('#74:238').addE('el3').from('#77:236').to('#74:238')
g.V(#77:236).as('#77:236').V(#161:276).as('#161:276').addE('el0').from('#77:236').to('#161:276')
g.V(#161:276).as('#161:276').V(#170:275).as('#170:275').addE('el4').from('#161:276').to('#170:275')
g.V(#80:236).as('#80:236').V(#167:275).as('#167:275').addE('el2').from('#80:236').to('#167:275')
g.V(#74:238).as('#74:238').V(#161:276).as('#161:276').addE('el1').from('#74:238').to('#161:276')
g.V(#74:238).as('#74:238').V(#80:236).as('#80:236').addE('el3').from('#74:238').to('#80:236')
g.V(#167:275).as('#167:275').V(#164:276).as('#164:276').addE('el4').from('#167:275').to('#164:276')
g.V(#74:238).as('#74:238').V(#173:275).as('#173:275').addE('el1').from('#74:238').to('#173:275')
g.V(#77:236).as('#77:236').V(#164:276).as('#164:276').addE('el1').from('#77:236').to('#164:276')
g.V(#80:236).as('#80:236').V(#77:236).as('#77:236').addE('el3').from('#80:236').to('#77:236')
g.V(#77:236).as('#77:236').V(#167:275).as('#167:275').addE('el1').from('#77:236').to('#167:275')
g.V(#74:238).as('#74:238').V(#164:276).as('#164:276').addE('el2').from('#74:238').to('#164:276')
g.V(#77:236).as('#77:236').V(#173:275).as('#173:275').addE('el2').from('#77:236').to('#173:275')
g.V(#74:238).as('#74:238').V(#74:238).as('#74:238').addE('el3').from('#74:238').to('#74:238')
g.V(#173:275).as('#173:275').V(#182:273).as('#182:273').addE('el4').from('#173:275').to('#182:273')
g.V(#179:274).as('#179:274').V(#173:275).as('#173:275').addE('el4').from('#179:274').to('#173:275')
g.V(#77:236).as('#77:236').V(#182:273).as('#182:273').addE('el1').from('#77:236').to('#182:273')
g.V(#74:238).as('#74:238').V(#164:276).as('#164:276').addE('el1').from('#74:238').to('#164:276')

Activity

  1. lvca commented on Mar 10, 2023

    @lvca
    lvca
    on Mar 10, 2023
    Member
    More actions

    Please look at #931 (comment)

  2. lvca commented on Mar 14, 2023

    @lvca
    lvca
    on Mar 14, 2023
    Member
    More actions

    Closing this issue because similar to #931.

  3. lvca
    closed this as completedon Mar 14, 2023
  4. lvca
    self-assigned this
    on Mar 14, 2023
  5. lvca
    added
    invalidThis doesn't seem right
    wontfixThis will not be worked on
    on Mar 14, 2023
  6. lvca
    added this to the 23.3.1 milestone on Mar 14, 2023
  7. mergify
    added a commit that references this issue on Apr 6, 2026

    chore(deps): bump the github-actions group with 2 updates [skip ci]

    04e7bbc
  8. mergify
    added a commit that references this issue on May 24, 2026

    chore(deps): bump uuid and testcontainers in /e2e-js [skip ci]

    7989577
  9. tae898
    added 2 commits that reference this issue on Jun 28, 2026

    chore(deps): bump the github-actions group with 2 updates [skip ci]

    c040762

    chore(deps): bump uuid and testcontainers in /e2e-js [skip ci]

    b3bde1e
  10. mergify
    added a commit that references this issue on Jul 19, 2026

    chore(deps-dev): bump org.apache.maven.plugins:maven-enforcer-plugin …

    4e63abe
  11. mergify
    added a commit that references this issue on Jul 26, 2026

    build(deps-dev): bump org.apache.maven.plugins:maven-enforcer-plugin …

    ffbd683
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

invalidThis doesn't seem rightwontfixThis will not be worked on

Type

No type

Projects

No projects

    Milestone

    • 23.3.1

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.