Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #75: no longer throw when interpreting TINYINT(1) columns with non-0 or 1 values as booleans #83

Merged
merged 4 commits into from
Sep 5, 2024

Conversation

Mytherin
Copy link
Contributor

@Mytherin Mytherin commented Sep 5, 2024

Fixes #75

MySQL doesn't have a proper boolean type - instead generally TINYINT(1) or BIT(1) are used to represent booleans. Since #26 we support loading those columns as booleans. TINYINT(1) columns, however, can contain a wider range of values than a boolean (from -128 to 127). Previously we would throw an exception when a larger number was encountered. This PR modifies the behavior so that we instead interpret numbers <= 0 as false, and numbers > 0 as true.

@Mytherin Mytherin merged commit 248b976 into duckdb:main Sep 5, 2024
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant