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

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

                Author: ASF GitHub Bot
            Created on: 17/Jul/18 19:51
            Start Date: 17/Jul/18 19:51
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on a change in pull request #5956: 
[BEAM-4794] Move SQL and SQL Nexmark to the schema framework
URL: https://github.com/apache/beam/pull/5956#discussion_r203156306
 
 

 ##########
 File path: 
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/JsonToRow.java
 ##########
 @@ -98,7 +98,7 @@ public void processElement(ProcessContext context) {
                       context.output(jsonToRow(objectMapper(), 
context.element()));
                     }
                   }))
-          .setCoder(schema.getRowCoder());
+          .setSchema(schema, SerializableFunctions.identity(), 
SerializableFunctions.identity());
 
 Review comment:
   These functions are not being applied here. All schemas in Beam must be 
registered with a conversion function to/from Row. These conversions are 
applied by Beam at the appropriate places (e.g. in the DoFn state machine). 
They can't really be specified as part of ParDo, because they are needed to 
implement ParDo behind the scenes!
   
   In this case, it's clearly not needed as the type is already Row. Will add a 
simpler function for PCollection<Row>

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


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

    Worklog Id:     (was: 124193)
    Time Spent: 1.5h  (was: 1h 20m)

> Move Nexmark and SQL to use the new Schema framework
> ----------------------------------------------------
>
>                 Key: BEAM-4794
>                 URL: https://issues.apache.org/jira/browse/BEAM-4794
>             Project: Beam
>          Issue Type: Sub-task
>          Components: dsl-sql
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 1.5h
>  Remaining Estimate: 0h
>
> This will allow SQL to accept user types. It will also allow the deletion of 
> a lot of code.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to