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

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

                Author: ASF GitHub Bot
            Created on: 17/Feb/20 18:35
            Start Date: 17/Feb/20 18:35
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on pull request #10883: [BEAM-9331] 
Add better Row builders
URL: https://github.com/apache/beam/pull/10883
 
 
   This PR adds two builders to the Row object. The first allows building a Row 
by specifying fields by name:
   
    Row row = Row.withSchema(schema)
                  .withFieldValue("userId", "user1)
                 .withFieldValue("location.city", "seattle")
                 .withFieldValue("location.state", "wa")
                  .build();
   
   The second allows building. a Row based on a previous row by specifying only 
the fields to change:
   
    Row modifiedRow =
       Row.fromRow(row)
           .withFieldValue("location.city", "tacoma")
           .build();
   
   R: @rezarokni 
 
----------------------------------------------------------------
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]


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

            Worklog Id:     (was: 388562)
    Remaining Estimate: 0h
            Time Spent: 10m

> The Row object needs better builders
> ------------------------------------
>
>                 Key: BEAM-9331
>                 URL: https://issues.apache.org/jira/browse/BEAM-9331
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Users should be able to build a Row object by specifying field names. Desired 
> syntax:
>  
> Row.withSchema(schema)
>    .withFieldName("field1", "value)
>   .withFieldName("field2.field3", value)
>   .build()
>  
> Users should also have a builder that allows taking an existing row and 
> changing specific fields.



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

Reply via email to