You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by vitaly-pushkar <gi...@git.apache.org> on 2017/04/04 20:20:10 UTC

[GitHub] kafka pull request #2806: KAFKA-4810: Kafka Connect SchemaBuilder unset fiel...

GitHub user vitaly-pushkar opened a pull request:

    https://github.com/apache/kafka/pull/2806

    KAFKA-4810: Kafka Connect SchemaBuilder unset fields validation fix

    https://issues.apache.org/jira/browse/KAFKA-4810
     
    > Currently SchemaBuilder is strict when checking that certain fields have not been set yet (e.g. version, name, doc). It just checks that the field is null. This is intended to protect the user from buggy code that overwrites a field with different values, but it's a bit too strict currently. In generic code for converting schemas (e.g. Converters) you will sometimes initialize a builder with these values (e.g. because you get a SchemaBuilder for a logical type, which sets name & version), but then have generic code for setting name & version from the source schema.
    
    Changed the validation method to not only check if a field is null but also to check if the new value that is being set is the same as the current value of the field.
    @ewencp


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/vitaly-pushkar/kafka KAFKA-4810-schema-builder-default-fields-validation

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/kafka/pull/2806.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2806
    
----
commit 7ed22f0b54ab09aebe6c2f6e9404974ba3b21ed1
Author: Vitaly Pushkar <vi...@gmail.com>
Date:   2017-04-04T20:00:46Z

    Change field null validation to accept the same value overwrite

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] kafka pull request #2806: KAFKA-4810: Kafka Connect SchemaBuilder unset fiel...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/kafka/pull/2806


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---