GitHub user vamossagar12 opened a pull request:

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

    Changes for supporting unsgined tinyint values

    Based upon the theory provided in the official jdbc documentation, I have 
added a condition to include both Short and Byte as INT8 types in ConnectSchema.
    
(https://docs.oracle.com/javase/6/docs/technotes/guides/jdbc/getstart/mapping.html)
    Here's the doc:
    
    > 8.3.5 SMALLINT
    > 
    > The JDBC type SMALLINT represents a 16-bit signed integer value between 
-32768 and 32767.
    > 
    > The corresponding SQL type, SMALLINT, is defined in SQL-92 and is 
supported by all the major databases. The SQL-92 standard leaves the precision 
of SMALLINT up to the implementation, but in practice, all the major databases 
support at least 16 bits.
    > 
    > The recommended Java mapping for the JDBC SMALLINT type is as a Java 
short.
    
    This would allow kafka-connect-jdbc to allow both signed and unsigned 
values. Currently it fails for unsigned values(i.e values > 127). This is 
specifically needed when fetching unsigned tinyint values from dbs using 
kafka-connect-jdbc. I have sent the PR to them and schema-registry as well to 
address the issue.

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

    $ git pull https://github.com/vamossagar12/kafka trunk

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

    https://github.com/apache/kafka/pull/2044.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 #2044
    
----
commit be3213d98c94b6569743254fc11bd619584cfce2
Author: Rao <raosa@3901c502984lm.local>
Date:   2016-10-19T18:05:05Z

    Changes for supporting unsgined tinyint values

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to