dbt-labs / dbt-bigquery

dbt-bigquery contains all of the code required to make dbt operate on a BigQuery database.
https://github.com/dbt-labs/dbt-bigquery
Apache License 2.0
223 stars 157 forks source link

Additional Unit Tests Column Logic #1348

Open anaghshineh opened 2 months ago

anaghshineh commented 2 months ago

Problem

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.

Checklist

mikealfare commented 1 month ago

closing/re-opening to pickup the ok to test label and run integration tests for a green CI