[
https://issues.apache.org/jira/browse/BEAM-12464?focusedWorklogId=643017&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-643017
]
ASF GitHub Bot logged work on BEAM-12464:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 27/Aug/21 21:26
Start Date: 27/Aug/21 21:26
Worklog Time Spent: 10m
Work Description: reuvenlax commented on pull request #14974:
URL: https://github.com/apache/beam/pull/14974#issuecomment-907485343
I can take a look again.
On Fri, Aug 27, 2021 at 2:24 PM Kyle Weaver ***@***.***>
wrote:
> ***@***.**** approved this pull request.
>
> Thank you for writing tests! LGTM
> ------------------------------
>
> In
>
sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoSchemaTranslator.java
> <https://github.com/apache/beam/pull/14974#discussion_r697723883>:
>
> > .withOptions(getFieldOptions(fieldDescriptor)));
> + } else if
(oneOfFieldLocationMap.containsKey(fieldDescriptorNumber)) {
> + Field oneOfField =
oneOfFieldLocationMap.get(fieldDescriptorNumber);
> + if (oneOfField != null) {
>
> In that case, can we save a redundant check like this?
>
> Field oneOfField = oneOfFieldLocation.get(fieldDescriptorNumber);
> if (oneOfField != null) {
> fields.add(oneOfField);
> }
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/beam/pull/14974#pullrequestreview-740899540>,
> or unsubscribe
>
<https://github.com/notifications/unsubscribe-auth/AFAYJVNKW6SN5I6XEIZSNVDT677CXANCNFSM46LBRHVA>
> .
> Triage notifications on the go with GitHub Mobile for iOS
>
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
>
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
>
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 643017)
Time Spent: 3h 20m (was: 3h 10m)
> Change ProtoSchemaTranslator beam schema creation to match the order for
> protobufs containing Oneof fields
> ----------------------------------------------------------------------------------------------------------
>
> Key: BEAM-12464
> URL: https://issues.apache.org/jira/browse/BEAM-12464
> Project: Beam
> Issue Type: Improvement
> Components: extensions-java-protobuf
> Reporter: Reuben van Ammers
> Priority: P3
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> Currently, when ProtoSchemaTranslator creates the beam schema from a protobuf
> definition it always puts the Oneofs at the start of the beam schema due to
> Oneofs being created from the code first. This means that the order of the
> fields doesn't match the order of the protobuf defintion. As the schema
> generation is used when converting from beam rows to protobufs, it
> additionally means that it is impossible to convert from a beam row where the
> oneof fields are not the first fields in the beamrow.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)