chamikaramj commented on code in PR #30264:
URL: https://github.com/apache/beam/pull/30264#discussion_r1487021778


##########
sdks/java/io/kafka/upgrade/src/main/java/org/apache/beam/sdk/io/kafka/upgrade/KafkaIOTranslation.java:
##########
@@ -245,7 +245,7 @@ public Row toConfigRow(Read<?, ?> transform) {
           transform = transform.withTopics(new ArrayList<>(topics));
         }
         Collection<Row> topicPartitionRows = 
configRow.getArray("topic_partitions");
-        if (topicPartitionRows != null) {
+        if (topicPartitionRows != null && !topicPartitionRows.isEmpty()) {

Review Comment:
   I couldn't find one or add one that also satisfies that checker-framework 
nullness check. So leaving as is.



##########
sdks/java/io/kafka/upgrade/src/main/java/org/apache/beam/sdk/io/kafka/upgrade/KafkaIOTranslation.java:
##########
@@ -137,7 +137,7 @@ public Row toConfigRow(Read<?, ?> transform) {
         fieldValues.put("topics", transform.getTopics());
       }
 
-      if (transform.getTopicPartitions() != null) {
+      if (transform.getTopicPartitions() != null && 
!transform.getTopicPartitions().isEmpty()) {

Review Comment:
   I couldn't find one or add one that also satisfies that checker-framework 
nullness check. So leaving as is.



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

Reply via email to