Details
Description
array_agg can throw the exception: "ERROR: array_agg: exception! (1/1)"
Statements to create the example data:
put "A" {"test":"test"} |
put "B" {"a_id":"A"} |
put "C" {"a_id":"A"} |
Example query:
SELECT array_agg(b) FROM _default AS a LEFT JOIN _default AS b ON b.a_id = META(a).id GROUP BY a
|
Output of "cblite":
[DB] ERROR: SQLite error (code 1): statement aborts at 47: [SELECT fl_result(fl_root(a.body)), fl_result(array_agg(fl_root(b.body))) FROM kv_default AS a LEFT JOIN kv_default AS b ON (fl_value(b.body, 'a_id') = a.key) AND (b.flags & 1 = 0) WHERE (a.flags & 1 = 0) GROUP BY fl_root(a.body)] array_agg: exception! |
[SQL] ERROR: array_agg: exception! (1/1) |
[SQL] ERROR: array_agg: exception! (1/1) |
Error starting query: array_agg: exception! (/1) |
Example script (with additional debug output) here:
https://colab.research.google.com/drive/1px5NCazezEOnfUHVQRoZHMJ-UXtVWkyq?usp=sharing