Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] Add support for AvroType enum for debezium format #4912

Open
2 tasks done
jsingh-yelp opened this issue Jan 14, 2025 · 0 comments
Open
2 tasks done

[Feature] Add support for AvroType enum for debezium format #4912

jsingh-yelp opened this issue Jan 14, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@jsingh-yelp
Copy link

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

Hello team,

I would like to request support for the ENUM type in the Debezium format, which is currently supported in Avro. Reference for the Avro Enum type implementation: Schema.java.

Solution

Currently, Flink treats enums as STRING by default. More specifically, "Avro enums have limited support. Flink supports reading and writing enums but treats them as a STRING type. From Flink's perspective, enums are not distinguishable from the STRING type. You can't create an Avro schema from Flink that has an enum field." Source: Flink Serialization Docs.

To provide similar support in Paimon, I believe that modifying the code to handle enums just as STRING types could work. For example, adding the following case in the Debezium schema utils:

case ENUM:
case STRING:
       return DataTypes.STRING();

This change can be made in DebeziumSchemaUtils.java.

Thanks let me know if something is unclear in this request.

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!
@jsingh-yelp jsingh-yelp added the enhancement New feature or request label Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant