Skip to content

SQL: Parenthesis affect content #3735

Description

@gramian

ArcadeDB Server v26.4.1-SNAPSHOT (build c514650a2989024dfc5185f1b5bbf5746531d6a7/1774415699993/main)

Running on Linux 6.17.0-19-generic - OpenJDK 64-Bit Server VM 25.0.2

Wrapping a query in parenthesis, i.e. for variable assignment, affects the outcome as demonstrated in the following sqlscript example:

LET $x = SELECT "hi" AS hi;
LET $y = (SELECT "hi" AS hi);
SELECT $x, $x.type(), $x.hi, $y, $y.type(), $y.hi

resulting in:

{
  "user": "root",
  "result": {
    "vertices": [],
    "edges": [],
    "records": [
      {
        "$x": [{"hi": "hi"}],
        "$x.type()": null,
        "$x.hi": [],

        "$y": [{"hi": "hi"}],
        "$y.type()": "LIST",
        "$y.hi": ["hi"]
      }
    ]
  },

(Tested in studio)

Activity

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions