[ https://issues.apache.org/jira/browse/BEAM-6772?focusedWorklogId=217404&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-217404 ]
ASF GitHub Bot logged work on BEAM-6772: ---------------------------------------- Author: ASF GitHub Bot Created on: 22/Mar/19 19:10 Start Date: 22/Mar/19 19:10 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-475746054 Given that this is mostly an issue eliding nested arrays, I wonder if we should merge this PR and file a JIRA for the nested array case. We can discuss the correct behavior on the JIRA. This PR seems more correct than the old behavior. On Fri, Mar 22, 2019 at 10:12 AM Kenn Knowles <notificati...@github.com> wrote: > I think the summary by @kanterov <https://github.com/kanterov> is super > clear are the right approach, but I don't know if I would call that "union" > so much as row building. > > For SQL I would state this as SELECT <expr1 : name1>, <expr2, name2> ... > each result is a new row containing the columns name1, name2 etc and the > type of each column is the type of the expression. > > Now for raw Beam if you select just a single column and the type of that > column can convert to a Java type, you shoulud be able to convert. > Specifically: > > - row with one int column convertible to int > - row with one row column matching a POJO can convert directly > > This is a step towards a thing mentioned in the Go SDK coders thread: > > - row with one bytes column w/ coder metadata equivalent to today's > approach of coders > > — > You are receiving this because you were mentioned. > Reply to this email directly, view it on GitHub > <https://github.com/apache/beam/pull/8006#issuecomment-475703407>, or mute > the thread > <https://github.com/notifications/unsubscribe-auth/AUGE1QmldObUjrqJDswOV3CXYalW27aCks5vZQ77gaJpZM4bh_oa> > . > ---------------------------------------------------------------- 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: 217404) Time Spent: 8h 40m (was: 8.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: 8h 40m > 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)