reuvenlax commented on pull request #14639: URL: https://github.com/apache/beam/pull/14639#issuecomment-827991186
proto3 does not provide has_xxx. the previous check I had is not perfectly reliable since it tries to deduce whether encoding_position is set, so there are edge cases that could cause data corruption. For that reason, I preferred having an explicit bit. On Tue, Apr 27, 2021 at 3:08 PM Brian Hulette ***@***.***> wrote: > *@TheNeuralBit* commented on this pull request. > ------------------------------ > > In model/pipeline/src/main/proto/schema.proto > <https://github.com/apache/beam/pull/14639#discussion_r621638446>: > > > @@ -37,6 +37,8 @@ message Schema { > // REQUIRED. An RFC 4122 UUID. > string id = 2; > repeated Option options = 3; > + // Indicates that encoding positions have been overridden. > + bool encoding_positions_set = 4; > > Why do we need to add this to the proto? Can't we continue to rely on > checking if encoding_position is set on the fields? > > — > You are receiving this because you authored the thread. > Reply to this email directly, view it on GitHub > <https://github.com/apache/beam/pull/14639#pullrequestreview-646400569>, > or unsubscribe > <https://github.com/notifications/unsubscribe-auth/AFAYJVPK3GLWPJ4JZZTRQZTTK4YVBANCNFSM43RPJLCQ> > . > -- 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. For queries about this service, please contact Infrastructure at: [email protected]
