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
Replace sqlite 32 column mask with our smart 64 bit one #3571
Labels
Milestone
Comments
Gerold103
added
refactoring
Code refactoring
sql
good first issue
Good for newcomers
labels
Jul 26, 2018
kshcherbatov
added a commit
that referenced
this issue
Aug 30, 2018
Refactored SQL Bitmask with tarantool core uint64_t column mask and API functions. Closes #3571.
kshcherbatov
added a commit
that referenced
this issue
Feb 8, 2019
Refactored column_mask.h definitions: introduced a new routine column_mask_is_overflowed, column_mask_is_set and macro COLUMN_MASK_BIT, COLUMN_MASK_SIZE. We need this helpers in further refactoring. Needed for #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 8, 2019
In some cases(like foreign keys) the SQL code is still used 32-bit bit mask, while 64-bit bit masks will perform better column optimizations. There was refactored code to work with 64b bitmasks where required. The 32b bitmasks are still used to specify constant OP_Function arguments because this change would require changing the P1 type of the VDBE p1 argument, which is not desirable. Moreover, the 64 function's arguments is an explicit overkill. Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 8, 2019
MASK BIT 32 macro is now redundant, so we got rid of it. Also refactored related code to use core bitmasks helpers Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 8, 2019
The original SQLite code allowed the program to be compiled using 32-bit masks to save disk space. Since we are not going to compile Tarantool in such way, we will get rid of these macros by replacing them(where possible) with helpers from column_mask.h Closes #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
Refactored column_mask.h definitions: introduced a new routine column_mask_is_overflowed, column_mask_is_set and macro COLUMN_MASK_BIT, COLUMN_MASK_SIZE. We need this helpers in further refactoring. Needed for #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
In some cases(like foreign keys) the SQL code is still used 32-bit bit mask, while 64-bit bit masks will perform better column optimizations. There was refactored code to work with 64b bitmasks where required. The 32b bitmasks are still used to specify constant OP_Function arguments because this change would require changing the P1 type of the VDBE p1 argument, which is not desirable. Moreover, the 64 function's arguments is an explicit overkill. Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
MASK BIT 32 macro is now redundant, so we got rid of it. Also refactored related code to use core bitmasks helpers Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
The original SQLite code allowed the program to be compiled using 32-bit masks to save disk space. Since we are not going to compile Tarantool in such way, we will get rid of these macros by replacing them(where possible) with helpers from column_mask.h Closes #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
Refactored column_mask.h definitions: introduced a new routine column_mask_is_overflowed, column_mask_is_set. Also a couple of routines for 32-bit bitmask. We need this helpers in further refactoring. Needed for #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
In some cases(like foreign keys) the SQL code is still used 32-bit bit mask, while 64-bit bit masks will perform better column optimizations. There was refactored code to work with 64b bitmasks where required. The 32b bitmasks are still used to specify constant OP_Function arguments because this change would require changing the P1 type of the VDBE p1 argument, which is not desirable. Moreover, the 64 function's arguments is an explicit overkill. Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
MASK BIT 32 macro is now redundant, so we got rid of it. Also refactored related code to use core bitmasks helpers Part of #3571
kshcherbatov
added a commit
that referenced
this issue
Feb 20, 2019
The original SQLite code allowed the program to be compiled using 32-bit masks to save disk space. Since we are not going to compile Tarantool in such way, we will get rid of these macros by replacing them(where possible) with helpers from column_mask.h Closes #3571
kshcherbatov
added a commit
that referenced
this issue
Mar 20, 2019
In some cases(like foreign keys) the SQL code used 32-bit bit mask, while 64-bit bit masks will perform better column optimizations. There was refactored code to work with 64b bitmasks where required. The 32b bitmasks are still used to specify constant OP_Function arguments because this change would require changing the P1 type of the VDBE p1 argument, which is not desirable. Moreover, the 64 function's arguments is an explicit overkill. The ticket was created in connection with the introduction of foreign keys and their use of 32-bit bit masks. In the rest of the scripts in SQL already use 64 bit masks, and the "smart" bit of the mask is not applicable. Closes #3571
kshcherbatov
added a commit
that referenced
this issue
Mar 27, 2019
In some cases(like foreign keys) the SQL code used 32-bit bit mask, while 64-bit bit masks will perform better column optimizations. There was refactored code to work with 64b bitmasks where required. The 32b bitmasks are still used to specify constant OP_Function arguments because this change would require changing the P1 type of the VDBE p1 argument, which is not desirable. Moreover, the 64 function's arguments is an explicit overkill. The ticket was created in connection with the introduction of foreign keys and their use of 32-bit bit masks. In the rest of the scripts in SQL already use 64 bit masks, and the "smart" bit of the mask is not applicable. Closes #3571
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Column mask in Tarantool is not just 32 bits greater, but also it is smarter. When a column with number > 63 is added to the mask, the only last bit (64th) is set indicating the overflow. SQLite mask in such a case just resets the whole mask in -1.
Lets replace sqlite column mask with our one in all places.
The text was updated successfully, but these errors were encountered: