CDAP-17330 Handle TINYINT in mysql.#99
Conversation
| case FLOAT32: | ||
| case FLOAT64: | ||
| return val; | ||
| case INT16: |
There was a problem hiding this comment.
None of the database type for mysql or sql server type is actually converted to INT8 by debezium. 1. https://debezium.io/documentation/reference/1.3/connectors/mysql.html#how-the-mysql-connector-maps-data-types_debezium
2. https://debezium.io/documentation/reference/1.3/connectors/sqlserver.html#sqlserver-data-types. We can get rid of it in separate PR.
There was a problem hiding this comment.
thanks for the information, Sagar. I guess we'd better not get rid of it, since here it's not related to any specific DB source. For example, if later we want to support Other DB source also through Debezium which will have datatype converted to INT8, it will be hard for us to remember there is hole to fill here.
| @Test | ||
| public void testConvert() { | ||
| String fieldName = "priority"; | ||
| Schema dateSchema = SchemaBuilder.struct().name("TinyIntSchema").field(fieldName, Schema.INT16_SCHEMA).build(); |
There was a problem hiding this comment.
nit: do you mean dataSchema ?
seanzhougoogle
left a comment
There was a problem hiding this comment.
thank you Sagar:)
7634efe to
974797d
Compare
https://issues.cask.co/browse/CDAP-17330
Debezium mysql connector converts TINYINT datatype in mysql to Short which does not have corresponding CDAP/Avro Schema type. Converting TINYINT to the INT Type.