You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2022/01/12 18:28:01 UTC

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

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

Beam JIRA Bot commented on BEAM-12736:
--------------------------------------

This issue is P2 but has been unassigned without any comment for 60 days so it has been labeled "stale-P2". If this issue is still affecting you, we care! Please comment and remove the label. Otherwise, in 14 days the issue will be moved to P3.

Please see https://beam.apache.org/contribute/jira-priorities/ for a detailed explanation of what these priorities mean.


> 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
>            Priority: P2
>              Labels: stale-P2
>   Original Estimate: 24h
>          Time Spent: 2h 20m
>  Remaining Estimate: 21h 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.20.1#820001)