You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following the MySQL spec , TINYINT(1) is one byte length and can store 256 different values hence it's not only TRUE or FALSE. Is this a bug or I don't understand something here?
The text was updated successfully, but these errors were encountered:
@koszti That's a good point, according strictly to the spec, it's not entirely accurate to type it as a boolean due to the implemented bit width. This behavior was implemented to be in line with a common use case of tinyint(1) data types as an alias for BOOLEAN, mentioned here. During development, I believe we came upon enough cases where this is the intended behavior to warrant this change.
That said, I could see this being overridden using a configuration option (in the config.json) or metadata on a column (in the catalog.json) if that would be preferable.
@dmosorast Is this override logic already available? If so, could you provide an example of what the overridden config.json or catalog.json would look like? Are we simply able to specify that, for example, a TINYINT(1) in the DB should be exported as a SMALLINT(1), or other appropriate data type?
TINYINT(1) is currently mapped to BOOLEAN at: https://github.com/singer-io/tap-mysql/blob/master/tap_mysql/__init__.py#L89
Following the MySQL spec , TINYINT(1) is one byte length and can store 256 different values hence it's not only TRUE or FALSE. Is this a bug or I don't understand something here?
The text was updated successfully, but these errors were encountered: