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: Add a e2e test on byte string array and remove a impossible case… #1546

Merged
merged 1 commit into from
Feb 24, 2022
Merged

Conversation

yirutang
Copy link
Contributor

Per internal bug b/219375453, it seems JSON object doesn't support cast of ByteString, so remove the ByteString case in repeated field conversion since it is not possible.

JSONArray jsonArray = new JSONArray(new ByteString[]{ByteString.copyFromUtf8("a"), ByteString.copyFromUtf8("b")}); LOG.info("" + (jsonArray.get(0) instanceof ByteString));
LOG.info("" + ((ByteString)jsonArray.get(0)).toByteArray());

INFO: *****false

java.lang.ClassCastException: class org.json.JSONObject cannot be cast to class com.google.protobuf.ByteString (org.json.JSONObject and com.google.protobuf.ByteString are in unnamed module of loader 'app')

@yirutang yirutang requested review from a team and tswast February 21, 2022 18:28
@product-auto-label product-auto-label bot added the api: bigquerystorage Issues related to the googleapis/java-bigquerystorage API. label Feb 21, 2022
@stephaniewang526 stephaniewang526 added the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 24, 2022
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Feb 24, 2022
@stephaniewang526 stephaniewang526 added the automerge Merge the pull request once unit tests and other checks pass. label Feb 24, 2022
@stephaniewang526 stephaniewang526 merged commit adcb9bb into googleapis:main Feb 24, 2022
@gcf-merge-on-green gcf-merge-on-green bot removed the automerge Merge the pull request once unit tests and other checks pass. label Feb 24, 2022
gcf-merge-on-green bot pushed a commit that referenced this pull request Feb 28, 2022
🤖 I have created a release *beep* *boop*
---


## [2.10.0](v2.9.1...v2.10.0) (2022-02-28)


### Features

* add trace_id for Read API ([#1544](#1544)) ([5a92ade](5a92ade))


### Bug Fixes

* Add a e2e test on byte string array and remove a impossible case for byte array conversion ([#1546](#1546)) ([adcb9bb](adcb9bb))
* add more idiomatic way to insert ARRAY<BYTES> data ([#1550](#1550)) ([3ae4038](3ae4038))
* remove bigquery.readonly auth scope ([#1543](#1543)) ([a70ae45](a70ae45))


### Dependencies

* update actions/github-script action to v6 ([#1533](#1533)) ([370c3b5](370c3b5))
* update dependency com.google.cloud:google-cloud-bigquery to v2.9.0 ([#1538](#1538)) ([43446b2](43446b2))


### Documentation

* **tutorials:** Add STRUCT column to tutorial ([#1534](#1534)) ([9595dab](9595dab))
* **tutorials:** Call append asynchronously instead of blocking ([#1542](#1542)) ([c777e23](c777e23))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
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

Successfully merging this pull request may close these issues.

2 participants