swaminathanmanish commented on code in PR #11753:
URL: https://github.com/apache/pinot/pull/11753#discussion_r1348838569
##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufConfluentSchemaTest.java:
##########
@@ -94,8 +103,16 @@ public void testSamplePinotConsumer()
ConsumerRecords<byte[], byte[]> consumerRecords =
kafkaConsumer.poll(Duration.ofMillis(1000));
Iterator<ConsumerRecord<byte[], byte[]>> iter = consumerRecords.iterator();
+ Consumer<Message> onMessage = message -> {
+ // we use this to verify we are not creating/consuming modified
descriptors
+ // older versions of confluent connectors (7.1.x and lower) used to
rewrite proto3 optional as oneof at descriptor
+ // level. Newer versions of confluent consumers support both
alternatives.
+ Descriptors.FieldDescriptor optionalField =
message.getDescriptorForType().findFieldByName("optionalField");
+ Assert.assertNull(optionalField.getRealContainingOneof(), "Received
protobuf have been rewritten");
Review Comment:
> This is a great find. Since we are using 7.4, can we skip this test ? Can
we assume that 7.4 will cover all cases of producers. **`if we use confluent >=
7.1.x we can read message emitted with >= 5.5.3`**
##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufConfluentSchemaTest.java:
##########
@@ -94,8 +103,16 @@ public void testSamplePinotConsumer()
ConsumerRecords<byte[], byte[]> consumerRecords =
kafkaConsumer.poll(Duration.ofMillis(1000));
Iterator<ConsumerRecord<byte[], byte[]>> iter = consumerRecords.iterator();
+ Consumer<Message> onMessage = message -> {
+ // we use this to verify we are not creating/consuming modified
descriptors
+ // older versions of confluent connectors (7.1.x and lower) used to
rewrite proto3 optional as oneof at descriptor
+ // level. Newer versions of confluent consumers support both
alternatives.
+ Descriptors.FieldDescriptor optionalField =
message.getDescriptorForType().findFieldByName("optionalField");
+ Assert.assertNull(optionalField.getRealContainingOneof(), "Received
protobuf have been rewritten");
Review Comment:
Since we are using 7.4, can we skip this test ? Can we assume that 7.4 will
cover all cases of producers.
**`if we use confluent >= 7.1.x we can read message emitted with >= 5.5.3`**
##########
pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufConfluentSchemaTest.java:
##########
@@ -94,8 +103,16 @@ public void testSamplePinotConsumer()
ConsumerRecords<byte[], byte[]> consumerRecords =
kafkaConsumer.poll(Duration.ofMillis(1000));
Iterator<ConsumerRecord<byte[], byte[]>> iter = consumerRecords.iterator();
+ Consumer<Message> onMessage = message -> {
+ // we use this to verify we are not creating/consuming modified
descriptors
+ // older versions of confluent connectors (7.1.x and lower) used to
rewrite proto3 optional as oneof at descriptor
+ // level. Newer versions of confluent consumers support both
alternatives.
+ Descriptors.FieldDescriptor optionalField =
message.getDescriptorForType().findFieldByName("optionalField");
+ Assert.assertNull(optionalField.getRealContainingOneof(), "Received
protobuf have been rewritten");
Review Comment:
> Should this be added as a check during table creation?
We cannot know this during table creation. Only when the message is
produced, this can be checked.
##########
pinot-plugins/pinot-file-system/pinot-gcs/pom.xml:
##########
@@ -82,7 +82,6 @@
<dependency>
<groupId>com.google.api.grpc</groupId>
<artifactId>proto-google-common-protos</artifactId>
- <version>1.18.1</version>
Review Comment:
> this one also means the pinot-gcs file system has upgrade to 2.9.6 from
1.18.1? (this is a major version bump, worth more testing)
What tests are recommended?
--
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]