walterddr commented on code in PR #11723:
URL: https://github.com/apache/pinot/pull/11723#discussion_r1344745782


##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufRecordExtractor.java:
##########
@@ -62,7 +62,7 @@ private Object getFieldValue(Descriptors.FieldDescriptor 
fieldDescriptor, Messag
     // Note w.r.t proto3 - If a field is not declared with optional keyword, 
there's no way to distinguish
     // if its explicitly set to a proto default or not been set at all i.e 
hasField() returns false
     // and we would use null.
-    if (fieldDescriptor.isRepeated() || !fieldDescriptor.isOptional() || 
message.hasField(fieldDescriptor)) {
+    if (fieldDescriptor.isRepeated() || !fieldDescriptor.hasPresence() || 
message.hasField(fieldDescriptor)) {

Review Comment:
   nit: should we change the note above? ("not declared with optional keyword" 
--> "is set as hasPresence flag")



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to