You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/09/01 20:20:00 UTC

[jira] [Work logged] (BEAM-12736) Protobuf schema provider row functions break on camel-case field names

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

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

                Author: ASF GitHub Bot
            Created on: 01/Sep/21 20:19
            Start Date: 01/Sep/21 20:19
    Worklog Time Spent: 10m 
      Work Description: TheNeuralBit commented on pull request #15306:
URL: https://github.com/apache/beam/pull/15306#issuecomment-910701618


   retest this please


-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

            Worklog Id:     (was: 645547)
    Remaining Estimate: 23h 40m  (was: 23h 50m)
            Time Spent: 20m  (was: 10m)

> Protobuf schema provider row functions break on camel-case field names
> ----------------------------------------------------------------------
>
>                 Key: BEAM-12736
>                 URL: https://issues.apache.org/jira/browse/BEAM-12736
>             Project: Beam
>          Issue Type: Bug
>          Components: extensions-java-protobuf
>    Affects Versions: 2.31.0
>            Reporter: Chris Hinds
>            Assignee: Chris Hinds
>            Priority: P2
>   Original Estimate: 24h
>          Time Spent: 20m
>  Remaining Estimate: 23h 40m
>
> ProtoByteBuddyUtils.protoGetterName() _depends_ on field names being snake-case. But the Protobuf style guide only _recommends_ that field names are so defined.  
> Snake-case is not enforced by protoc and my team have always created proto field names in camel-case (perhaps we didn't understand that protoc would automatically rewrite field names for us). It is likely that we are not alone.
> If one calls a row function against a proto instance whose field were defined in camel-case, an IllegalArgumentException results from the ProtoByteBuddyUtils snake-case assumption.
> {code:java}
> SerializableFunction myRowFunction = new ProtoMessageSchema().toRowFunction(new TypeDescriptor<MyDataModel.ProtoPayload>() {});
> MyDataModel.ProtoPayload payload = …
> Row row = (Row) myRowFunction.apply(payload);
> {code}



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