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 #1590DescriptionArcadeDB 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;
Activitygramian commented on May 17, 2024 CollaboratorAuthor More actions gramian commented on Jun 9, 2024 CollaboratorAuthor More actions lvca commented on Jun 9, 2024 The issue is here:
|
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. gramian commented 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. lvca commented on Jun 12, 2024 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.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|