Skip to content

fix: updates _get_transitive_schema_fields and tests #1200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 9, 2025

Conversation

chalmerlowe
Copy link
Collaborator

Adds a line to the _get_transitive_schema_fields function to correct an issue with dot notation in column names.

Also adds a test suite of tests to exercise the new functionality.

Fixes internal issue #406556097 🦕

@chalmerlowe chalmerlowe requested review from a team as code owners May 9, 2025 11:21
@chalmerlowe chalmerlowe requested a review from alvarowolfx May 9, 2025 11:21
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. labels May 9, 2025
@chalmerlowe chalmerlowe assigned chalmerlowe and unassigned mrfaizal May 9, 2025
Copy link
Collaborator

@tswast tswast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it. Thanks!


test_cases = [
(
"STRUCT field, not REPEATED, with sub-fields, should recurse",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Optional] Generally, I use pytest.param() with an ID argument instead of a description. That makes it a little easier to select a particular test. See

https://github.com/googleapis/python-bigquery-dataframes/blob/08d70b6ad3ab3ac7b9a57d93da00168a8de7df9a/tests/system/small/operations/test_plotting.py#L203-L204

for an example.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, thanks for the reminder on this option.

@chalmerlowe chalmerlowe merged commit 16712da into main May 9, 2025
14 checks passed
@chalmerlowe chalmerlowe deleted the fix-406556097-correct-dot-notation branch May 9, 2025 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-sqlalchemy API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants