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

fix: prevent exception caused by adding duplicate fields in schema generation #195

Merged
merged 2 commits into from
Oct 18, 2024

Conversation

Emrehzl94
Copy link
Contributor

This PR fixes an issue where duplicate fields in the ChangeEvent schema generation process were causing org.apache.kafka.connect.errors.SchemaBuilderException: Cannot create field because of field name duplication id exception. When building the schema for key array elements, if different maps contained the same field name, the field was being added multiple times, resulting in the exception.

@Emrehzl94 Emrehzl94 requested a review from a team as a code owner October 18, 2024 10:42
@Emrehzl94 Emrehzl94 merged commit c2d0767 into neo4j:main Oct 18, 2024
16 checks passed
topics =
arrayOf(
CdcSourceTopic(
topic = "cdc", patterns = arrayOf(CdcSourceParam("(:TestSource)"))))))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

quick q unrelated to the PR: can't the patterns attribute here just be an array of strings? the CdcSourceParam type seems a bit verbose to me here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants