[ 
https://issues.apache.org/jira/browse/BEAM-8743?focusedWorklogId=347711&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-347711
 ]

ASF GitHub Bot logged work on BEAM-8743:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Nov/19 21:26
            Start Date: 21/Nov/19 21:26
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on pull request #10158: 
[BEAM-8743] Add support for flat schemas in pubsub
URL: https://github.com/apache/beam/pull/10158#discussion_r349325681
 
 

 ##########
 File path: 
sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/pubsub/PubsubMessageToRow.java
 ##########
 @@ -68,8 +69,21 @@
 
   public abstract boolean useDlq();
 
+  public abstract boolean useFlatSchema();
+
   private Schema payloadSchema() {
-    return messageSchema().getField(PAYLOAD_FIELD).getType().getRowSchema();
+    if (useFlatSchema()) {
+      Schema.Builder builder = Schema.builder();
+      for (Schema.Field field : messageSchema().getFields()) {
 
 Review comment:
   Done. I'm a fan of pithy things with streams
 
----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 347711)
    Time Spent: 2h 10m  (was: 2h)

> Add support for flat schemas in pubsub
> --------------------------------------
>
>                 Key: BEAM-8743
>                 URL: https://issues.apache.org/jira/browse/BEAM-8743
>             Project: Beam
>          Issue Type: Improvement
>          Components: dsl-sql
>            Reporter: Brian Hulette
>            Assignee: Brian Hulette
>            Priority: Major
>             Fix For: 2.18.0
>
>          Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> See 
> https://lists.apache.org/thread.html/bf4c37f21bda194d7f8c40f6e7b9a776262415755cc1658412af3c76@%3Cdev.beam.apache.org%3E



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to