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

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

                Author: ASF GitHub Bot
            Created on: 20/Feb/20 20:05
            Start Date: 20/Feb/20 20:05
    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#discussion_r382229033
 
 

 ##########
 File path: sdks/java/core/src/main/java/org/apache/beam/sdk/values/Row.java
 ##########
 @@ -599,272 +709,555 @@ public Builder addArray(Object... values) {
       return this;
     }
 
-    // Values are attached. No verification is done, and no conversions are 
done. LogicalType
-    // values must be specified as the base type.
+    // Values are attached. No verification is done, and no conversions are 
done. LogicalType values
+    // must be specified
+    // as the base type. This method should be used with great care, as no 
validation is done. If
+    // incorrect values are
+    // passed in, it could result in strange errors later in the pipeline. 
This method is largely
+    // used internal
+    // to Beam.
+    @Internal
     public Builder attachValues(List<Object> values) {
 
 Review comment:
   I like making attachValues return a Row. I thin the same for 
withFieldValueBuilders. this simplifies the builder code
 
----------------------------------------------------------------
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: 390212)
    Time Spent: 2h 10m  (was: 2h)

> 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: 2h 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