SteNicholas edited a comment on pull request #16142:
URL: https://github.com/apache/flink/pull/16142#issuecomment-870208177


   @AHeise , thanks for detailed rephrase and I hold a different point of view:
   
   1.  The `defaultTopicId` could be null in the constructor of 
`KafkaSerializationSchema` for the case that user doesn't define the `TOPIC` 
table option, in which case that `defaultTopicId` is unnecessary regarded as 
`TOPIC_UNSPECIFIED `.
   2. The return value of `DynamicKafkaSerializationSchema#getTargetTopic` is 
never null after adding the check whether the `TOPIC` metadata column is null 
or empty. But this check is a very expensive operation that is executed for 
every record in the hot path, therefore in terms of performance this check 
could be unnecessary and can rely on the user to specify it correctly.
   
   I have added the check whether the `TOPIC` metadata column is null or empty 
in `DynamicKafkaSerializationSchema#getTargetTopic/readMetadata` but IMO this 
check could be removed. @AHeise what do you think about?


-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to