TheNeuralBit commented on a change in pull request #13980:
URL: https://github.com/apache/beam/pull/13980#discussion_r588512681



##########
File path: 
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/pubsub/PubsubSchemaIOProvider.java
##########
@@ -206,17 +211,18 @@ public Schema schema() {
       return new PTransform<PBegin, PCollection<Row>>() {
         @Override
         public PCollection<Row> expand(PBegin begin) {
+          PubsubMessageToRow.Builder builder =
+              PubsubMessageToRow.builder()
+                  .messageSchema(dataSchema)
+                  .useDlq(config.useDeadLetterQueue())
+                  .useFlatSchema(useFlatSchema);
+          if (!useFlatSchema && !fieldPresent(schema(), PAYLOAD_FIELD, 
FieldType.BYTES)) {

Review comment:
       Confirmed that this change fixes internal tests.




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


Reply via email to