Only the get_nested_column_data_types method in dbt/adapters/bigquery/column.py has unit tests defined. This method relies on other methods to produce its output. These other methods operate recursively and can be difficult to follow for the range of possible inputs (as I found when investigating https://github.com/dbt-labs/dbt-bigquery/issues/1278). Adding more unit tests to ensure the integrity of these recursive methods would provide developers with a lot more confidence when making changes.
Solution
This PR adds many unit tests for the recursive _update_nested_column_data_types method. These will help ensure the integrity of column-related logic, particularly more complex logic around the handling of nested columns.
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
Problem
Only the
get_nested_column_data_types
method indbt/adapters/bigquery/column.py
has unit tests defined. This method relies on other methods to produce its output. These other methods operate recursively and can be difficult to follow for the range of possible inputs (as I found when investigating https://github.com/dbt-labs/dbt-bigquery/issues/1278). Adding more unit tests to ensure the integrity of these recursive methods would provide developers with a lot more confidence when making changes.Solution
This PR adds many unit tests for the recursive
_update_nested_column_data_types
method. These will help ensure the integrity of column-related logic, particularly more complex logic around the handling of nested columns.Checklist