Akshatsharma2205 commented on code in PR #38776:
URL: https://github.com/apache/beam/pull/38776#discussion_r3343264962
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/providers/BigQueryStorageWriteApiSchemaTransformProvider.java:
##########
@@ -197,12 +197,13 @@ public PCollectionRowTuple expand(PCollectionRowTuple
input) {
: Duration.standardSeconds(triggeringFrequency));
}
// set num streams if specified, otherwise default to autoSharding
- if (numStreams > 0) {
- write = write.withNumStorageWriteApiStreams(numStreams);
- } else if (autoSharding == null || autoSharding) {
+ if (numStreams <= 0 && (autoSharding == null || autoSharding)) {
Review Comment:
Updated in the latest commit. Since `numStreams` is now validated to be
non-negative, the auto-sharding condition uses `numStreams == 0`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]