Skip to content

[v3.0.1] LET block always returns null when used with out function #8283

@mehdizarepour

Description

@mehdizarepour

OrientDB Version: 3.0.1

Java Version: 1.8

OS: Linux

I want to use Let block in my query.

Actual/Expected behavior

When I assign an edge to a variable in LET block and use it in projection, it returns null. But it is expected to return a value.

SELECT $x, name FROM V
let $x = out("E")
SELECT $x, name FROM V
let $x = out("E").name

Result:

{
  "result": [
        {
            "$x": null,
            "name": "A"
        },
        {
            "$x": null,
            "name": "B"
        }
    ],
}

Steps to reproduce

insert into V set id = 1, name = "A"
insert into V set id = 2, name = "B"

create edge E from (select from V where id = 1) to (select from V where id = 2)

SELECT $x, name FROM V
let $x = out("E") 

Metadata

Metadata

Labels

buglegacy not used anymore

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions