You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Yufan Sheng (Jira)" <ji...@apache.org> on 2022/04/19 13:32:00 UTC

[jira] [Commented] (FLINK-27300) Support scala case class for PulsarSchema

    [ https://issues.apache.org/jira/browse/FLINK-27300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17524306#comment-17524306 ] 

Yufan Sheng commented on FLINK-27300:
-------------------------------------

I have tested the scala case class with Avro on https://github.com/streamnative/flink-example/blob/main/src/main/scala/io/streamnative/flink/scala/AvroSink.scala.

Everything seems fine. So can you provide more information on this context?

> Support scala case class for PulsarSchema
> -----------------------------------------
>
>                 Key: FLINK-27300
>                 URL: https://issues.apache.org/jira/browse/FLINK-27300
>             Project: Flink
>          Issue Type: Improvement
>          Components: Connectors / Pulsar
>    Affects Versions: 1.15.0
>            Reporter: Ben Longo
>            Priority: Minor
>
> Case classes do not appear to work with pulsar schema.
> {noformat}
> case class MyFancyCaseClass(...)
> /// ...
> val pulsarAvroSchema = PulsarSchema.AVRO(classOf[MyFancyCaseClass]);
> val pulsarSerializationSchema = PulsarSerializationSchema.pulsarSchema(pulsarAvroSchema, classOf[MyFancyCaseClass]){noformat}
> This fails looking for the class here https://github.com/apache/flink/blob/release-1.15.0-rc3/flink-connectors/flink-connector-pulsar/src/main/java/org/apache/flink/connector/pulsar/common/schema/PulsarSchemaUtils.java#L199



--
This message was sent by Atlassian Jira
(v8.20.7#820007)