apilloud commented on a change in pull request #15886:
URL: https://github.com/apache/beam/pull/15886#discussion_r743092758



##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/ParDo.java
##########
@@ -683,6 +686,18 @@ public static DoFnSchemaInformation 
getDoFnSchemaInformation(
                 (SchemaCoder<?>) input.getCoder(), accessDescriptor, 
selectedSchema, elementT);
       }
     }
+    if (input.hasSchema()) {

Review comment:
       Removed.

##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFnSchemaInformation.java
##########
@@ -101,7 +107,16 @@ DoFnSchemaInformation withSelectFromSchemaParameter(
                     unbox))
             .build();
 
-    return toBuilder().setElementConverters(converters).build();
+    List<FieldAccessDescriptor> descriptors =
+        ImmutableList.<FieldAccessDescriptor>builder()
+            .addAll(getFieldAccessDescriptors())
+            .add(selectDescriptor)
+            .build();
+
+    return toBuilder()
+        .setElementConverters(converters)
+        .setFieldAccessDescriptors(descriptors)
+        .build();

Review comment:
       I refactored this so setElementConverters and setFieldAccessDescriptors 
are separate methods.

##########
File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFnSchemaInformation.java
##########
@@ -101,7 +107,16 @@ DoFnSchemaInformation withSelectFromSchemaParameter(
                     unbox))
             .build();
 
-    return toBuilder().setElementConverters(converters).build();
+    List<FieldAccessDescriptor> descriptors =
+        ImmutableList.<FieldAccessDescriptor>builder()
+            .addAll(getFieldAccessDescriptors())
+            .add(selectDescriptor)
+            .build();

Review comment:
       Thanks for pointing that out! I was looking for that method.




-- 
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]


Reply via email to