I have a table on BigQuery with 3,674,736 rows, when I run a query with the window function LAG and PARTITION BY a field that has 370 distinct values, BigQuery returns "Error: Resources exceeded during query execution.".
Is there any limit on window functions, but not documented?