Skip to content
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

fix(bigquery): empty slice instead of nil slice for primitive repeated fields #7315

Merged
merged 8 commits into from May 17, 2024

Conversation

alvarowolfx
Copy link
Contributor

@alvarowolfx alvarowolfx commented Jan 26, 2023

BigQuery translates a NULL array into an empty array in the query result, although inside the query, NULL and empty arrays are two distinct values. This change brings the translation on the Go side more similar to the BQ backend. More on: https://cloud.google.com/bigquery/docs/reference/standard-sql/data-types#array_nulls

Resolves #4950 #9383

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jan 26, 2023
@alvarowolfx alvarowolfx changed the title fix!: empty slice instead of nil slice for primitive repeated fields fix(bigquery)!: empty slice instead of nil slice for primitive repeated fields Jan 27, 2023
@product-auto-label product-auto-label bot added size: m Pull request size is medium. and removed size: s Pull request size is small. labels Jan 27, 2023
@product-auto-label product-auto-label bot added the stale: old Pull request is old and needs attention. label Feb 26, 2023
@product-auto-label product-auto-label bot added stale: extraold Pull request is critically old and needs prioritization. and removed stale: old Pull request is old and needs attention. labels Mar 28, 2023
@proost
Copy link

proost commented Jun 24, 2023

@alvarowolfx do you have any progress?

@alvarowolfx alvarowolfx changed the title fix(bigquery)!: empty slice instead of nil slice for primitive repeated fields fix(bigquery): empty slice instead of nil slice for primitive repeated fields May 13, 2024
@alvarowolfx alvarowolfx marked this pull request as ready for review May 13, 2024 18:50
@alvarowolfx alvarowolfx requested review from a team as code owners May 13, 2024 18:50
@alvarowolfx alvarowolfx added the kokoro:run Add this label to force Kokoro to re-run the tests. label May 15, 2024
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label May 15, 2024
Copy link
Contributor

@shollyman shollyman left a comment

Choose a reason for hiding this comment

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

The change itself is straightforward. We provide the most substantive guidance about value handling https://pkg.go.dev/cloud.google.com/go/bigquery#RowIterator.Next, is there anything you think we should include there to clarify this behavior?

@alvarowolfx
Copy link
Contributor Author

The change itself is straightforward. We provide the most substantive guidance about value handling https://pkg.go.dev/cloud.google.com/go/bigquery#RowIterator.Next, is there anything you think we should include there to clarify this behavior?

I added more information on that section about empty vs null arrays, do you think looks good ?

@alvarowolfx alvarowolfx merged commit b371210 into googleapis:main May 17, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size: m Pull request size is medium. stale: extraold Pull request is critically old and needs prioritization.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bigquery: inconsistency in handling of repeated nested values and repeated values in valueMap
4 participants