fqaiser94 commented on code in PR #174:
URL: 
https://github.com/apache/flink-connector-kafka/pull/174#discussion_r4123668936


##########
flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/table/DynamicKafkaDeserializationSchema.java:
##########
@@ -264,7 +267,7 @@ private static final class OutputProjectionCollector
         @Override
         public void collect(RowData physicalValueRow) {
             // no key defined
-            if (keyProjection.length == 0) {
+            if (keyProjector.isEmptyProjection()) {

Review Comment:
   Great catch. Fixed in 
https://github.com/apache/flink-connector-kafka/pull/174/commits/692840dcf6953974a420fb66eced473b428b10ce
 
   
   `collect` now decides on `keyDeserialization != null`, passed in as `hasKey`.
   
   New ITCase `testProjectionPushdownSkipsRecordsWithNullKey` (avro, csv, json) 
was green on main,
   red before the fix, green again after.



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