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: proto converter library #100

Merged
merged 2 commits into from Mar 15, 2020
Merged

Conversation

yirutang
Copy link
Contributor

@yirutang yirutang commented Mar 10, 2020

Add a client library addition to convert users schemas from the output of Descriptor.toProto to API acceptable ProtoSchema. This is needed for all users using the Write API.

The DescriptorProto needs to be self contained (contains all referenced type definition) so that server can reconstruct the schema from scratch.

	modified:   google-cloud-bigquerystorage/pom.xml
	new file:   google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverter.java
	new file:   google-cloud-bigquerystorage/src/test/java/com/google/cloud/bigquery/storage/v1alpha2/ProtoSchemaConverterTest.java
	new file:   google-cloud-bigquerystorage/src/test/proto/test.proto
	modified:   pom.xml
@googlebot googlebot added the cla: yes label Mar 10, 2020
@yirutang yirutang changed the title Proto Converter library feat: Proto Converter library Mar 10, 2020
@chingor13 chingor13 requested a review from stephaniewang526 Mar 10, 2020
@chingor13 chingor13 added the kokoro:force-run label Mar 10, 2020
@yoshi-kokoro yoshi-kokoro removed kokoro:force-run labels Mar 10, 2020
@stephaniewang526 stephaniewang526 changed the title feat: Proto Converter library feat: proto Converter library Mar 11, 2020
@stephaniewang526 stephaniewang526 changed the title feat: proto Converter library feat: proto converter library Mar 11, 2020
google-cloud-bigquerystorage/pom.xml Outdated Show resolved Hide resolved
@yirutang
Copy link
Contributor Author

@yirutang yirutang commented Mar 12, 2020

@yirutang
Copy link
Contributor Author

@yirutang yirutang commented Mar 13, 2020

@stephaniewang526 stephaniewang526 added kokoro:force-run automerge labels Mar 15, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Mar 15, 2020
@codecov
Copy link

@codecov codecov bot commented Mar 15, 2020

Codecov Report

Merging #100 into master will decrease coverage by 0.49%.
The diff coverage is 93.33%.

Impacted file tree graph

@@             Coverage Diff             @@
##             master     #100     +/-   ##
===========================================
- Coverage     72.36%   71.86%   -0.5%     
+ Complexity      281      270     -11     
===========================================
  Files            39       40      +1     
  Lines          1809     1784     -25     
  Branches          4        9      +5     
===========================================
- Hits           1309     1282     -27     
- Misses          496      497      +1     
- Partials          4        5      +1
Impacted Files Coverage Δ Complexity Δ
...igquery/storage/v1alpha2/ProtoSchemaConverter.java 93.33% <93.33%> (ø) 6 <6> (?)
...igquery/storage/v1beta1/BigQueryStorageClient.java 68.75% <0%> (-1.84%) 16% <0%> (-3%)
...ery/storage/v1beta1/BaseBigQueryStorageClient.java 68.75% <0%> (-1.84%) 16% <0%> (-3%)
...d/bigquery/storage/v1beta2/BigQueryReadClient.java 51.51% <0%> (-1.43%) 8% <0%> (-1%)
.../cloud/bigquery/storage/v1/BigQueryReadClient.java 51.51% <0%> (-1.43%) 8% <0%> (-1%)
...ud/bigquery/storage/v1/BaseBigQueryReadClient.java 54.54% <0%> (-1.34%) 9% <0%> (-1%)
...gquery/storage/v1beta2/BaseBigQueryReadClient.java 54.54% <0%> (-1.34%) 9% <0%> (-1%)
...ery/storage/v1beta2/stub/GrpcBigQueryReadStub.java 89.74% <0%> (-0.62%) 9% <0%> (-1%)
...bigquery/storage/v1/stub/GrpcBigQueryReadStub.java 89.74% <0%> (-0.62%) 9% <0%> (-1%)
...y/storage/v1alpha2/stub/GrpcBigQueryWriteStub.java 92.79% <0%> (-0.55%) 11% <0%> (-1%)
... and 9 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c4814dc...32231af. Read the comment docs.

@gcf-merge-on-green
Copy link

@gcf-merge-on-green gcf-merge-on-green bot commented Mar 15, 2020

Your PR has attempted to merge for 3 hours. Please check that all required checks have passed, you have an automerge label, and that all your reviewers have approved the PR

2 similar comments
@gcf-merge-on-green
Copy link

@gcf-merge-on-green gcf-merge-on-green bot commented Mar 15, 2020

Your PR has attempted to merge for 3 hours. Please check that all required checks have passed, you have an automerge label, and that all your reviewers have approved the PR

@gcf-merge-on-green
Copy link

@gcf-merge-on-green gcf-merge-on-green bot commented Mar 15, 2020

Your PR has attempted to merge for 3 hours. Please check that all required checks have passed, you have an automerge label, and that all your reviewers have approved the PR

@gcf-merge-on-green
Copy link

@gcf-merge-on-green gcf-merge-on-green bot commented Mar 15, 2020

Your PR was not mergeable because either one of your required status checks failed, or one of your required reviews was not approved. See required reviews for your repo here: https://github.com/googleapis/sloth/blob/master/required-checks.json

@stephaniewang526 stephaniewang526 merged commit 8fbb80e into googleapis:master Mar 15, 2020
15 checks passed
@yirutang yirutang deleted the work-3 branch Jun 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants