Want to understand what is the coalesce stage in Bigquery and in what cases this stage is seen in the plan. I didn't found information about this stage in bigquery documentation.
Note: I am not using coalesce function in the query.
Following is the screenshot for reference

The coalesce step in the query plan is because you are querying multiple tables. This step is combining the data from each additional table you query. So, each new table, a new coalesce (and join) will be added to combine this data.
Its different than the conditional function COALESCE()
The point is, each step can directly write only one set of data to a next step. If a new set have to write, this data will be read again, that will be the coalesce step. The following chart represents what happen when 1, 2 or 3 tables a queried, and shows the join and coalesce steps. This is just an exemplification, another operations as cross are been omitted.

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With