Yes, field is marked as nullable. Here is a test case change to illustrate it: https://github.com/JozoVilcek/beam/commit/5e1c6324868c2fd6145dd2348c7358fdc787ac38
On Sun, Dec 12, 2021 at 7:28 PM Reuven Lax <[email protected]> wrote: > Is the schema field marked as nullable? > > On Sun, Dec 12, 2021 at 4:21 AM Jozef Vilcek <[email protected]> > wrote: > >> I did notice that protobuf schema translator supports nullable for proto >> fiels [1]. E.g. if I want to a nullable string, then in proto I can use >> `google.protobuf.StringValue` and schema will look fine. >> >> However, fromRow creator does not support this and throw exception if it >> is presented with row instance with null value. It tries to pass this null >> to a `StringValue` while proto way would be probably ignoring the set in >> that case. >> >> I can submit a failing test case and JIRA but want to check first if this >> is supposed to be supported - having row with nulls handled and >> creating instance of compatible protobuf. >> >> Thanks, >> Jozo >> >> >> [1] >> https://github.com/apache/beam/blob/master/sdks/java/extensions/protobuf/src/main/java/org/apache/beam/sdk/extensions/protobuf/ProtoSchemaTranslator.java#L106 >> >
