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

sql: Support MySQL SET types to improve usage of 64 bit ints as bitmasks #27415

Open
awoods187 opened this issue Jul 11, 2018 · 2 comments
Open

sql: Support MySQL SET types to improve usage of 64 bit ints as bitmasks #27415

awoods187 opened this issue Jul 11, 2018 · 2 comments

Comments

@awoods187
Copy link
Contributor

@awoods187 awoods187 commented Jul 11, 2018

A "SET type" (from MySQL) is a datatype where values can contain zero, one or more values from a fixed list of up to 64 different possile values. They behave like a set because duplicates are not allowed and the order is not preserved.

MySQL implements this using a bitmap, with one bit per possible value in the fixed list of allowable values..

So implementation-wise this is really a feature on top of 64-bit integers.

https://dev.mysql.com/doc/refman/5.7/en/set.html

@knz

This comment has been minimized.

Copy link
Member

@knz knz commented Jul 20, 2018

I double checked:

  1. postgres does not support set types;
  2. oracle does not support neither enums nor set types

So this is a mysql-specific feature really. I'll remove the "pgcompat" label and add this to the wish list.

@knz knz changed the title Support SET types sql: Support SET types Jul 20, 2018
@knz knz changed the title sql: Support SET types sql: Support MySQL SET types to improve usage of 64 bit ints as bitmasks Jul 20, 2018
@knz knz removed the A-sql-pgcompat label Jul 20, 2018
@jordanlewis jordanlewis added this to Triage in SQL Execution Team Apr 23, 2019
@jordanlewis jordanlewis moved this from Triage to Lower priority backlog in SQL Execution Team Apr 24, 2019
@knz knz added C-wishlist and removed C-enhancement labels May 6, 2019
@knz knz removed their assignment May 6, 2019
@bra-fsn

This comment has been minimized.

Copy link

@bra-fsn bra-fsn commented May 23, 2019

If you ever decide to implement this it would be nice not to limit this to 64 bits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
SQL Execution Team
  
Lower priority backlog
(DEPRECATED) SQL Front-end, Lang & Se...
  
Feature requests / pie-in-the-skie
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.