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

feat: Add getStringOrDefault method to FieldValue #3255

Merged
merged 4 commits into from Apr 29, 2024
Merged

feat: Add getStringOrDefault method to FieldValue #3255

merged 4 commits into from Apr 29, 2024

Conversation

PhongChuong
Copy link
Contributor

@PhongChuong PhongChuong commented Apr 19, 2024

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #3179 ☕️

@PhongChuong PhongChuong requested a review from a team as a code owner April 19, 2024 17:38
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: bigquery Issues related to the googleapis/java-bigquery API. labels Apr 19, 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.

Should we exercise this in the tests using a null string rather than sentinel string value? Similarly, do we need to do this for all the typed getters?

@PhongChuong
Copy link
Contributor Author

/gcbrun

@PhongChuong PhongChuong requested a review from a team as a code owner April 24, 2024 18:50
@PhongChuong
Copy link
Contributor Author

Added comment suggestions.
And as discussed offline, we will only provide getStringOrDefault for String types for now. Other types can be added as if there are user requests for it.

@PhongChuong
Copy link
Contributor Author

Thanks for the review.

@PhongChuong PhongChuong merged commit 8bac33a into main Apr 29, 2024
20 checks passed
@PhongChuong PhongChuong deleted the 3179 branch April 29, 2024 19:48
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/java-bigquery API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FieldValueList & FieldValue throwing null pointer exception when getting value of nullable field
2 participants