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: expose settings to configure default missing value interpretation. #2230

Merged
merged 6 commits into from
Aug 17, 2023

Conversation

GaoleMeng
Copy link
Contributor

Expose a new API to configure the default missing value interpretation.

This value will affect the column that has default value defined, but not presented in the missing value map.

For JsonStreamWriter:

  1. If this value is set to DEFAULT_VALUE, we will always populate default value if the
    field is missing from json and default value is defined in the column.
  2. If this value is set to NULL_VALUE, we will always not populate default value.

For StreamWriter:
It will be the default configuration for the value not presented in the missing value map

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 #<issue_number_goes_here> ☕️

If you write sample code, please follow the samples format.

@GaoleMeng GaoleMeng requested a review from a team as a code owner August 16, 2023 01:52
@GaoleMeng GaoleMeng requested a review from Neenu1995 August 16, 2023 01:52
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. labels Aug 16, 2023
@GaoleMeng GaoleMeng requested a review from yirutang August 16, 2023 01:52
@GaoleMeng GaoleMeng added the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 17, 2023
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Aug 17, 2023
* <p>If this value is set to `DEFAULT_VALUE`, we will always populate default value if the
* field is missing from json and default value is defined in the column.
*
* <p>If this value is set to `NULL_VALUE`, we will always not populate default value.
Copy link
Contributor

Choose a reason for hiding this comment

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

Change the comment of 'NULL_VALUE' to: we will always populate NULL to the missing fields, which is currently our default behavior.

@yirutang yirutang merged commit dc5ed73 into googleapis:main Aug 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants