swaminathanmanish commented on code in PR #11682:
URL: https://github.com/apache/pinot/pull/11682#discussion_r1336491884


##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufRecordExtractorTest.java:
##########
@@ -166,7 +166,7 @@ private Map<String, Object> createRecord1() {
     record.put(LONG_FIELD, 100L);
     record.put(DOUBLE_FIELD, 1.1);
     record.put(FLOAT_FIELD, 2.2f);
-    record.put(BOOL_FIELD, "false");
+    record.put(BOOL_FIELD, "true");

Review Comment:
   > Yes I thought about this as well. Protobuf seems to treat the field as 
optional, when the value is set to its default. This seems to be the behavior. 
Whats your suggestion to handle this ? I found a similar issue in the 
community. 
[protocolbuffers/protobuf#10560](https://github.com/protocolbuffers/protobuf/issues/10560).
   
   As the github issue says
   "It seems like the implementation details of proto3 allow for more things to 
be optional even if they're not declared that way. In the doc above, in the API 
changes section, point 3, they suggest has_optional_keyword(). This works for 
my use case." 
   
    And hasOptionalKeyword() was deprecated just recently. 
   
   



-- 
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