Closed flyingsilverfin closed 6 months ago
We fix a bug where a Fetch query with a Get-Aggregate subquery that returned an empty (ie. undefined) answer throw a null pointer exception.
For example this used to error if 'Alice' doesn't have any salaries in the database, since a 'sum' is undefined for 0 entries.
match $x isa person, has name $n; $n == "Alice"; fetch $n as "name"; total-salary: { match $x has salary $s; get $s; sum $s; };
We now return the following JSON structure
[ { "name": {"value": "Alice", "type": {"label": "name", "root": "attribute", "value_type": "string"}}, "total-salary": null } ]
Do not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed.
Trivial Change
Code
Architecture
Usage and product changes
We fix a bug where a Fetch query with a Get-Aggregate subquery that returned an empty (ie. undefined) answer throw a null pointer exception.
For example this used to error if 'Alice' doesn't have any salaries in the database, since a 'sum' is undefined for 0 entries.
We now return the following JSON structure
Implementation