Skip to content

Comments

KAFKA-20201: Connect Transforms: SchemaUtil.copySchemaBasics(Schema) does not preserve keySchema and valueSchema for MAP type#21525

Open
CokeLee777 wants to merge 1 commit intoapache:trunkfrom
CokeLee777:KAFKA-20201
Open

KAFKA-20201: Connect Transforms: SchemaUtil.copySchemaBasics(Schema) does not preserve keySchema and valueSchema for MAP type#21525
CokeLee777 wants to merge 1 commit intoapache:trunkfrom
CokeLee777:KAFKA-20201

Conversation

@CokeLee777
Copy link

Description:

Fixes a latent bug in SchemaUtil.copySchemaBasics(Schema) where passing a MAP schema would result in a broken SchemaBuilder with null keySchema and valueSchema.

Added a MAP type branch to correctly copy the key and value schemas, and included corresponding unit tests.

Note:

Currently, no callers within the codebase pass a MAP schema to this method, so there are no active runtime failures. However, since SchemaUtil#copySchemaBasics is a public utility method, this is a latent bug. This proactive fix ensures that if any future transforms or external connectors pass a MAP schema, it will be handled correctly.

@github-actions github-actions bot added triage PRs from the community connect small Small PRs labels Feb 20, 2026
Fixes a latent bug in `SchemaUtil.copySchemaBasics(Schema)` where
passing a MAP schema would result in a broken `SchemaBuilder` with
null `keySchema` and `valueSchema`.

Added a MAP type branch to correctly copy the key and value schemas,
and included corresponding unit tests.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved connect small Small PRs triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants