chai
chai copied to clipboard
Document literal should return an error when referring to field not yet declared
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.