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

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

                Author: ASF GitHub Bot
            Created on: 19/Mar/19 21:45
            Start Date: 19/Mar/19 21:45
    Worklog Time Spent: 10m 
      Work Description: reuvenlax commented on issue #8006: [BEAM-6772] Change 
Select semantics to match what a user expects
URL: https://github.com/apache/beam/pull/8006#issuecomment-474596897
 
 
   @kanterov I've changed the implementation to always wrap the selected output 
with a Row. This matches what SQL and Spark does, and is also more 
self-consistent: it means that selecting a nested Row is the same as selecting 
a nested Integer).
   
   One concern is that users will want to use the Convert function to convert 
the result to their POJO (e.g. 
.apply(Select.fieldNames("location")).apply(Convert.to(Location.class)). So 
I've also modified the Convert transform to allow automatic unboxing of Rows in 
this case.
   
   I will have push one more commit adding extra test coverage, however the 
functionality is already pushed.
 
----------------------------------------------------------------
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: 215782)
    Time Spent: 5h 10m  (was: 5h)

> Select transform has non-intuitive semantics
> --------------------------------------------
>
>                 Key: BEAM-6772
>                 URL: https://issues.apache.org/jira/browse/BEAM-6772
>             Project: Beam
>          Issue Type: Sub-task
>          Components: sdk-java-core
>            Reporter: Reuven Lax
>            Assignee: Reuven Lax
>            Priority: Major
>          Time Spent: 5h 10m
>  Remaining Estimate: 0h
>
> Consider the following schema:
> User:
>     name: STRING
>     location: Location
>  
> Location:
>     latitude: DOUBLE
>     longitude: DOUBLE
>  
> If you apply Select.fieldNames("location"), most users expect to get back a 
> row matching the Location schema. Instead you get back an outer schema with a 
> single location field in it. Select should instead unnest the output up to 
> the point where multiple fields are selected.



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

Reply via email to