Skip to content

MySQL: Allow optional SIGNED suffix on integer data types #1985

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

Merged
merged 1 commit into from
Aug 1, 2025

Conversation

mvzink
Copy link
Contributor

@mvzink mvzink commented Jul 30, 2025

In MySQL, a data type like INT(20) SIGNED is equivalent to INT(20). In other dialects, this may be interpreted differently; e.g. in Postgres, SELECT 1::integer signed indicates an alias of "signed". So we parse the optional SIGNED suffix only on dialects that allow it (I currently don't know of any other than MySQL).

In MySQL, a data type like `INT(20) SIGNED` is equivalent to `INT(20)`.
In other dialects, this may be interpreted differently; e.g. in
Postgres, `SELECT 1::integer signed` indicates an alias of "signed". So
we parse the optional `SIGNED` suffix only on dialects that allow it (I
currently don't know of any other than MySQL).
@mvzink mvzink force-pushed the push-tqonuxmzypyv branch from deed2ce to 28d2183 Compare July 31, 2025 15:23
Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @mvzink!
cc @alamb

@iffyio iffyio merged commit f5f51eb into apache:main Aug 1, 2025
10 checks passed
@mvzink mvzink deleted the push-tqonuxmzypyv branch August 1, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants