1
votes

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?

1

1 Answers

1
votes

There's a lack of information to diagnose this. However, based on the title it sounds like you may be trying to use window functions and allowLargeResults to generate output, which is unsupported.

You may also want to review the troubleshooting document for more context on the resources exceeded error.