yyfhust commented on code in PR #34505: URL: https://github.com/apache/beam/pull/34505#discussion_r2025256262
########## sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java: ########## @@ -1784,8 +1784,10 @@ public PCollection<KafkaRecord<K, V>> expand(PBegin input) { .withConsumerConfigOverrides(kafkaRead.getConsumerConfig()) .withOffsetConsumerConfigOverrides(kafkaRead.getOffsetConsumerConfig()) .withConsumerFactoryFn(kafkaRead.getConsumerFactoryFn()) - .withKeyDeserializerProvider(kafkaRead.getKeyDeserializerProvider()) - .withValueDeserializerProvider(kafkaRead.getValueDeserializerProvider()) + .withKeyDeserializerProviderAndCoder( + kafkaRead.getKeyDeserializerProvider(), keyCoder) + .withValueDeserializerProviderAndCoder( + kafkaRead.getValueDeserializerProvider(), valueCoder) Review Comment: this is at the entry of kafka IO, and it will 100% return a coder : https://github.com/apache/beam/blob/800d434e862c3ea48c74a38a6ab96387ed06fbf1/sdks/java/io/kafka/src/main/java/org/apache/beam/sdk/io/kafka/KafkaIO.java#L1940-L1943 if coder is given, it will return the coder specified by user. If not, it will attempt to retrieve a coder from registry , which only has coder for build-in deserializer. -- 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: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org