syhily commented on a change in pull request #18406:
URL: https://github.com/apache/flink/pull/18406#discussion_r827819349
##########
File path:
flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/common/schema/factories/KeyValueSchemaFactory.java
##########
@@ -69,11 +69,8 @@ public SchemaType type() {
public TypeInformation<KeyValue<K, V>> createTypeInfo(SchemaInfo info) {
KeyValue<SchemaInfo, SchemaInfo> kvSchemaInfo =
decodeKeyValueSchemaInfo(info);
- Schema<K> keySchema =
PulsarSchemaUtils.createSchema(kvSchemaInfo.getKey());
- Class<K> keyClass = decodeClassInfo(keySchema.getSchemaInfo());
-
- Schema<V> valueSchema =
PulsarSchemaUtils.createSchema(kvSchemaInfo.getValue());
- Class<V> valueClass = decodeClassInfo(valueSchema.getSchemaInfo());
+ Class<K> keyClass = decodeClassInfo(kvSchemaInfo.getKey());
+ Class<V> valueClass = decodeClassInfo(kvSchemaInfo.getValue());
Review comment:
This change is ok. All the recreating checks should be done in the
constructor.
--
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]