-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Fixes an issue with splitReadStream #6112
Conversation
All of these methods were handwritten.
The server denies requests without a fractional value set. This change sets a semi-sensible default. In the future we should remove this method and force users to use the one with a request message since users should know what fraction they want to split at (i.e., 0.5 is not always a good choice).
Thanks for submitting this. The comments mean that this entire file is managed by a code generator, so any hand-written updates will be overwritten. We will need to address this upstream in our generator and/or service definitions. Can you open an issue here to reference and we will look into how to best make the changes upstream? |
I was told my @mmladenovski that this file was written by hand, which is why I removed the comments. How is this file generated? |
@aryann , the file was added with #4022 . @kmjung , might provide more details. I think it was copied from the auto-generated BaseBigQueryStorageClient and then modified to use the Enhanced stub along with the ResumptionStrategy. Currently the file is manually maintained. The comments related to auto-generation should be removed. |
SplitReadStreamRequest.newBuilder().setOriginalStream(originalStream).build(); | ||
SplitReadStreamRequest.newBuilder() | ||
.setOriginalStream(originalStream) | ||
.setFraction(0.5f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to move the 0.5f
value to a constant STREAM_SPLIT_FRACTION
and use it in all places!
The BigQuery Storage client for Java now lives here: https://github.com/googleapis/java-bigquerystorage and has recently been re-generated. The comments re: auto-generation are still present because this is an autogenerated library, but if you see other issues (the file referenced from v1beta1 is here: https://github.com/googleapis/java-bigquerystorage/blob/master/google-cloud-bigquerystorage/src/main/java/com/google/cloud/bigquery/storage/v1beta1/BigQueryStorageClient.java) please file an issue in that repo. I'm going to go ahead and close this. cc: @stephaniewang526 as an FYI and in case you want to do something different with this issue. :) |
The method requires a fraction, which is not provided in this client.
Additionally, I'm removing some comments that don't make sense.