I run a query transforming huge tables to a json document based on a period. It works great for a modest period (little dataset). However, when increasing the period (huge dataset) I get this error:
SQL ERROR[54000] ERROR: array size exceeds the maximum allowed (1073741823)