You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "urbandan (via GitHub)" <gi...@apache.org> on 2023/02/15 09:45:09 UTC

[GitHub] [kafka] urbandan commented on pull request #10566: KAFKA-12694 Avoid schema mismatch DataException when validating default values

urbandan commented on PR #10566:
URL: https://github.com/apache/kafka/pull/10566#issuecomment-1431030129

   I would propose a 4th option as well: changing the ConnectSchema#validateValue method to use a different logic for Struct default values:
   1. Use the Schema methods
   2. Ignore optional and default value
   
   The benefit would be that it wouldn't change the existing equals logic, existing code utilizing SchemaBuilder would keep working, and it would fix the ambiguity around optionality and default being part of the schema check (while in reality, they should belong to the field, and not the schema).
   
   I have a working change with this 4th option, please  let me know if this logic is acceptable, and I'll submit a PR.


-- 
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: jira-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org