You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ferenc-csaky (via GitHub)" <gi...@apache.org> on 2025/11/17 20:04:43 UTC
Re: [PR] [FLINK-34466][LINEAGE] Support dataset type facet for Avro [flink-connector-kafka]
ferenc-csaky commented on code in PR #171:
URL: https://github.com/apache/flink-connector-kafka/pull/171#discussion_r2535366840
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/lineage/TypeDatasetFacet.java:
##########
@@ -1,11 +1,26 @@
package org.apache.flink.connector.kafka.lineage;
import org.apache.flink.annotation.PublicEvolving;
+import org.apache.flink.api.common.serialization.SerializationSchema;
import org.apache.flink.api.common.typeinfo.TypeInformation;
import org.apache.flink.streaming.api.lineage.LineageDatasetFacet;
+import java.util.Optional;
+
/** Facet definition to contain type information of source and sink. */
@PublicEvolving
public interface TypeDatasetFacet extends LineageDatasetFacet {
TypeInformation getTypeInformation();
+
+ /**
+ * Sometimes a sink implementing {@link TypeDatasetFacetProvider} is not able to extract type.
+ * This is happening for AvroSerializationSchema due to type erasure problem. In this case, it
+ * makes sense to expose SerializationSchema to the lineage consumer so that it can use it to
+ * extract type information.
+ *
+ * @return
+ */
+ default Optional<SerializationSchema> getSerializationSchema() {
Review Comment:
I strongly agree. The whole `TypeDatasetFacet` should be removed from here. As far as i can tell, this PR should be revived and merged beforehand: https://github.com/apache/flink/pull/25712
--
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-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org