You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/06/20 17:14:05 UTC
[jira] [Commented] (KAFKA-3864) Kafka Connect Struct.get returning
defaultValue from Struct not the field schema
[ https://issues.apache.org/jira/browse/KAFKA-3864?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15339930#comment-15339930 ]
ASF GitHub Bot commented on KAFKA-3864:
---------------------------------------
GitHub user rollulus opened a pull request:
https://github.com/apache/kafka/pull/1528
KAFKA-3864: make field.get return field's default value when needed
And not the containing struct's default value.
The contribution is my original work and that I license the work to the project under the project's open source license.
@ewencp
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/rollulus/kafka kafka-3864
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/kafka/pull/1528.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 #1528
----
commit c305defb362ce82d51463c506c12e5943a124713
Author: Rollulus <ro...@xs4all.nl>
Date: 2016-06-20T16:27:58Z
KAFKA-3864: make field.get return field's default
And not the containing struct's default value
----
> Kafka Connect Struct.get returning defaultValue from Struct not the field schema
> --------------------------------------------------------------------------------
>
> Key: KAFKA-3864
> URL: https://issues.apache.org/jira/browse/KAFKA-3864
> Project: Kafka
> Issue Type: Bug
> Components: KafkaConnect
> Affects Versions: 0.9.0.1
> Reporter: Andrew Stevenson
> Assignee: Ewen Cheslack-Postava
> Priority: Blocker
> Fix For: 0.10.1.0, 0.10.0.1
>
>
> `public Object get(Field field) {
> Object val = values[field.index()];
> if (val == null && schema.defaultValue() != null) {
> val = schema.defaultValue();
> }
> return val;
> }`
> Should be field.schema.defautlValue
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)