chai icon indicating copy to clipboard operation
chai copied to clipboard

Document literal should return an error when referring to field not yet declared

Open asdine opened this issue 2 years ago • 0 comments

Example:

genji> create table foo;
genji> insert into foo values {a: b+1, b: 1};
genji> select * from foo;
{
  "a": null,
  "b": 1
}

The document literal is evaluated from left to right. When b + 1 is being evaluated, it is not yet declared and thus evaluate to NULL. We should return an error instead.

asdine avatar Jul 02 '22 13:07 asdine