arcadedb icon indicating copy to clipboard operation
arcadedb copied to clipboard

SQL: UNWIND and projections

Open gramian opened this issue 1 year ago • 0 comments

ArcadeDB Version:

ArcadeDB Server v24.5.1-SNAPSHOT (build 11db1796a17bfccb23d22cfa73906fbae9f46338/1714568271787/main)

OS and JDK Version:

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

If a projection is present in a query with an UNWIND, the result contains only the first collection element, but it should return as many records as collection elements.

Expected behavior

#1:0
#1:0
#1:0

Actual behavior

#1:0

Steps to reproduce

Setup:

CREATE DOCUMENT TYPE doc;
CREATE PROPERTY doc.lst LIST;
INSERT INTO doc SET lst = [1,2,3];

Without projection one record per list element is returned as expected:

SELECT FROM doc UNWIND lst

Given a projection only a single record is returned:

SELECT @rid FROM doc UNWIND lst

gramian avatar May 01 '24 13:05 gramian