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/10/07 20:06: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=661882&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-661882 ]

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

                Author: ASF GitHub Bot
            Created on: 07/Oct/21 20:05
            Start Date: 07/Oct/21 20:05
    Worklog Time Spent: 10m 
      Work Description: aaltay commented on pull request #15306:
URL: https://github.com/apache/beam/pull/15306#issuecomment-938115637


   Any update on this? Should we close it?


-- 
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: 661882)
    Remaining Estimate: 22.5h  (was: 22h 40m)
            Time Spent: 1.5h  (was: 1h 20m)

> 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: 1.5h
>  Remaining Estimate: 22.5h
>
> 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)