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

Handle missing/null repeated optional fields when converting Json messages to Protobuf #1761

Closed
yenchau-google opened this issue Aug 24, 2022 · 1 comment
Labels
api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API.

Comments

@yenchau-google
Copy link

Problem encountered / steps to reproduce

For repeated columns in the BigQuery TableSchema, the JsonToProtoMessage.convertJsonToProtoMessage converter [here] requires that the input Json object both contains

  • the array field, and
  • it is not null.

If either of those things are not true, it fails with an error, before sending it to BigQuery

Investigations:

We tracked the cause of the error down to the fillRepeatedField method inside that converter, specifically [this line] which throws an error if the Json field is null or missing: jsonArray = json.getJSONArray(exactJsonKeyName);

Therefore it would be great to get this issue fixed.
Many thanks.

@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. label Aug 24, 2022
@Neenu1995
Copy link
Contributor

Fixed.

gcf-owl-bot bot added a commit that referenced this issue Feb 10, 2023
…p/templates/java_library/.kokoro (#1761)

* build(deps): bump cryptography

Bumps [cryptography](https://github.com/pyca/cryptography) from 38.0.3 to 39.0.1.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@38.0.3...39.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: disabling dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tomo Suzuki <suztomo@google.com>
Co-authored-by: ddixit14 <deepankardixit@google.com>
Source-Link: googleapis/synthtool@0c6f8d4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:5ee35ee919254a3d1e7d4f8abbf1b8c8869ade317ceb2e4df709af1b4b3e9ca1
Neenu1995 pushed a commit that referenced this issue Feb 14, 2023
…p/templates/java_library/.kokoro (#1761) (#1992)

* build(deps): bump cryptography

Bumps [cryptography](https://github.com/pyca/cryptography) from 38.0.3 to 39.0.1.
- [Release notes](https://github.com/pyca/cryptography/releases)
- [Changelog](https://github.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](pyca/cryptography@38.0.3...39.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...



* chore: disabling dependabot

---------





Source-Link: googleapis/synthtool@0c6f8d4
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:5ee35ee919254a3d1e7d4f8abbf1b8c8869ade317ceb2e4df709af1b4b3e9ca1

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tomo Suzuki <suztomo@google.com>
Co-authored-by: ddixit14 <deepankardixit@google.com>
shubhwip pushed a commit to shubhwip/java-bigquerystorage that referenced this issue Oct 7, 2023
…p/templates/java_library/.kokoro (googleapis#1761) (googleapis#1112)

* build(deps): bump cryptography

Bumps [cryptography](https://togithub.com/pyca/cryptography) from 38.0.3 to 39.0.1.
- [Release notes](https://togithub.com/pyca/cryptography/releases)
- [Changelog](https://togithub.com/pyca/cryptography/blob/main/CHANGELOG.rst)
- [Commits](https://togithub.com/pyca/cryptography/compare/38.0.3...39.0.1)

---
updated-dependencies:
- dependency-name: cryptography
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: disabling dependabot

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Tomo Suzuki <suztomo@google.com>
Co-authored-by: ddixit14 <deepankardixit@google.com>
Source-Link: https://togithub.com/googleapis/synthtool/commit/0c6f8d4ac5358553ee734e26574f390bc43a736e
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-java:latest@sha256:5ee35ee919254a3d1e7d4f8abbf1b8c8869ade317ceb2e4df709af1b4b3e9ca1
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.
Projects
None yet
Development

No branches or pull requests

2 participants