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 — SQL: "bothE" function returns number of edges instead of array of edges · Issue #1590 · ArcadeData/arcadedb

SQL: "bothE" function returns number of edges instead of array of edges #1590

New issue
Copy link
New issue
Copy link
Closed
Bug
Closed
SQL: "bothE" function returns number of edges instead of array of edges#1590
Bug
Copy link
Assignees
lvca
Milestone
25.7.1

Description

@gramian
gramian
opened on May 10, 2024
Issue body actions

ArcadeDB Version:

ArcadeDB Server v24.5.1-SNAPSHOT (build 7872d1acb3616c2866613dabcb7d899322bb3348/1715204385992/main)

OS and JDK Version:

Running on Mac OS X 12.7.4 - OpenJDK 64-Bit Server VM 17.0.11 (Homebrew)

Expected behavior

[{"@cat":"e","@type":"E","@rid":"#25:0","@in":"#1:0","@out":"#1:0"},{"@cat":"e","@type":"E","@rid":"#25:0","@in":"#1:0","@out":"#1:0"}]

Actual behavior

2

Steps to reproduce

CREATE VERTEX TYPE V;
CREATE EDGE TYPE E;
INSERT INTO V;
CREATE EDGE E FROM (SELECT FROM V) TO (SELECT FROM V);
SELECT bothE() FROM V;

Activity

Next
  1. gramian commented on May 17, 2024

    @gramian
    gramian
    on May 17, 2024
    CollaboratorAuthor
    More actions

    The problem is probably here: https://github.com/ArcadeData/arcadedb/blob/main/engine/src/main/java/com/arcadedb/graph/GraphEngine.java#L438 .

  2. gramian commented on Jun 9, 2024

    @gramian
    gramian
    on Jun 9, 2024
    CollaboratorAuthor
    More actions

    @lvca this is weird:

    Changing in https://github.com/ArcadeData/arcadedb/blob/main/engine/src/main/java/com/arcadedb/graph/GraphEngine.java#L438 :

    return result;

    to:

    return () -> result;
    

    seems to make it work, but I do not understand why, as for vertices (see getVertices in the same file) it works correctly without the () ->.

  3. lvca commented on Jun 9, 2024

    @lvca
    lvca
    on Jun 9, 2024
    Member
    More actions

    The issue is here:

    arcadedb/engine/src/main/java/com/arcadedb/serializer/JsonSerializer.java

    Line 107 in 4281a1c

    if (useCollectionSizeForEdges && value.iterator().next() instanceof Edge)
    . The serializer for studio put edge count every time a collection of edges is present.

    From studio if you want to see the result in a table use this SELECT expand( bothE() ) FROM V.

    With HTTP/JSON API, the recommended serializer used is "graph" that also uses this settings, so the result would still be 2.

  4. lvca
    self-assigned this
    on Jun 9, 2024
  5. lvca
    added this to the 24.6.1 milestone on Jun 9, 2024
  6. gramian commented on Jun 9, 2024

    @gramian
    gramian
    on Jun 9, 2024
    CollaboratorAuthor
    More actions

    OK, but why do inE and outE work as expected? Also I confirm that bothE works in console.

  7. lvca commented on Jun 12, 2024

    @lvca
    lvca
    on Jun 12, 2024
    Member
    More actions

    The reason is that bothE returns a collection. I think it was introduced to avoid serializing vertices with thousands of edges. But in your case you're expressly asking for them, so it should return the edges, not the counter.

  8. lvca
    modified the milestones: 24.6.1, 24.8.1 on Jul 23, 2024
  9. lvca
    modified the milestones: 24.10.1, 24.11.1 on Oct 12, 2024
  10. lvca
    modified the milestones: 24.11.1, 24.11.2 on Nov 5, 2024
  11. lvca
    modified the milestones: 24.11.2, This milestone has been deleted on Dec 9, 2024
  12. 12 remaining items

  13. lvca
    modified the milestones: 25.5.1, 25.6.1 on May 30, 2025
  14. lvca
    modified the milestones: 25.6.1, 25.7.1 on Jul 4, 2025
  15. lvca
    added
    bug
    in progressThe team is actively working on this issue
    on Aug 10, 2025
  16. lvca
    added the
    Bug
    issue type on Aug 10, 2025
  17. lvca
    added a commit that references this issue on Aug 10, 2025

    fix: json serializer now is consistent with edges retrieved in differ…

    3a08ebe
  18. lvca
    closed this as completedon Aug 10, 2025
  19. lvca
    removed
    in progressThe team is actively working on this issue
    on Aug 10, 2025
  20. mergify
    added a commit that references this issue on Aug 29, 2025

    chore(studio-deps-dev)(deps-dev): bump css-loader from 6.11.0 to 7.1.…

    e2a697a
  21. robfrank
    added a commit that references this issue on Sep 10, 2025

    fix: json serializer now is consistent with edges retrieved in differ…

    015fd9f
  22. tae898
    added 2 commits that reference this issue on Jun 28, 2026

    fix: json serializer now is consistent with edges retrieved in differ…

    b20acc4

    chore(studio-deps-dev)(deps-dev): bump css-loader from 6.11.0 to 7.1.…

    b20a7e1
  23. mergify
    added a commit that references this issue on Aug 10, 2026

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

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

Metadata

Metadata

Assignees

  • @lvca
    lvca

Labels

No labels
No labels

Type

Bug

Projects

No projects

    Milestone

    • 25.7.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.