johnjcasey commented on code in PR #29670: URL: https://github.com/apache/beam/pull/29670#discussion_r1437140626
########## sdks/java/core/src/main/java/org/apache/beam/sdk/io/WriteFiles.java: ########## @@ -495,28 +528,43 @@ private WriteUnshardedBundlesToTempFiles( @Override public PCollection<FileResult<DestinationT>> expand(PCollection<UserT> input) { - if (getMaxNumWritersPerBundle() < 0) { - return input - .apply( - "WritedUnshardedBundles", - ParDo.of(new WriteUnshardedTempFilesFn(null, destinationCoder)) - .withSideInputs(getSideInputs())) - .setCoder(fileResultCoder); - } TupleTag<FileResult<DestinationT>> writtenRecordsTag = new TupleTag<>("writtenRecords"); TupleTag<KV<ShardedKey<Integer>, UserT>> unwrittenRecordsTag = new TupleTag<>("unwrittenRecords"); + Coder<UserT> inputCoder = input.getCoder(); + if (getMaxNumWritersPerBundle() < 0) { + PCollectionTuple writeTuple = + input.apply( + "WritedUnshardedBundles", + ParDo.of(new WriteUnshardedTempFilesFn(null, destinationCoder, inputCoder)) Review Comment: This was unecessary as it turns out, so I've removed it -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org