You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/09 18:05:52 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #11069: [DO NOT SUBMIT] Test UW + Dataflow + Kafka + UnboundedSource SDF wrapper

lukecwik commented on a change in pull request #11069: [DO NOT SUBMIT] Test UW + Dataflow + Kafka + UnboundedSource SDF wrapper
URL: https://github.com/apache/beam/pull/11069#discussion_r389868124
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/io/Read.java
 ##########
 @@ -222,13 +222,13 @@ private Unbounded(@Nullable String name, UnboundedSource<T, ?> source) {
                         new UnboundedSourceAsSDFWrapperFn<>(
                             (Coder<CheckpointMark>) source.getCheckpointMarkCoder())))
                 .setCoder(ValueWithRecordIdCoder.of(source.getOutputCoder()));
-        // TODO(BEAM-2939): Add support for deduplication.
-        // if (source.requiresDeduping()) {
-        //   outputWithIds.apply(
-        //       Distinct.<ValueWithRecordId<T>, byte[]>withRepresentativeValueFn(
-        //               element -> element.getId())
-        //           .withRepresentativeType(TypeDescriptor.of(byte[].class)));
-        // }
+
+        if (source.requiresDeduping()) {
+          outputWithIds.apply(
+              Deduplicate.<ValueWithRecordId<T>, byte[]>withRepresentativeValueFn(
 
 Review comment:
   Yes

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services