reuvenlax commented on a change in pull request #11280: [BEAM-9652] Ensure that
the multipartition write sets the correct coder to use instead of relying on
coder inference.
URL: https://github.com/apache/beam/pull/11280#discussion_r401266788
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BatchLoads.java
##########
@@ -399,11 +396,9 @@ public WriteResult
expandUntriggered(PCollection<KV<DestinationT, ElementT>> inp
PCollection<KV<TableDestination, String>> tempTables =
writeTempTables(partitions.get(multiPartitionsTag),
loadJobIdPrefixView);
- Coder<TableDestination> tableDestinationCoder =
- clusteringEnabled ? TableDestinationCoderV3.of() :
TableDestinationCoderV2.of();
tempTables
.apply("ReifyRenameInput", new ReifyAsIterable<>())
- .setCoder(IterableCoder.of(KvCoder.of(tableDestinationCoder,
StringUtf8Coder.of())))
+ .setCoder(IterableCoder.of(tempTables.getCoder()))
Review comment:
I think this setCoder belongs inside the ReifyAsIterable PTransform
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services