-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Subsharding vindex #9428
Subsharding vindex #9428
Conversation
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
… use Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
d931ef3
to
e144577
Compare
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
Signed-off-by: Harshit Gangal <harshit@planetscale.com>
@csquared take a look at the PR description. |
@harshit-gangal, thank you for such a good description, we should reuse it for the documentation. I have a question regarding |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great to me!
We need to document this change
_c1__c2_c2_c2__c3__c3__c3_c3_ c1 - 1 byte For the column Cn -> Cn.Hash(Cn_values)[0 : n_bytes_allocated_for_column] |
Description
This PR adds a new generic MultiColumn Vindex that can be used only as a primary vindex.
This Vindex takes in 3 inputs
column_count
- the number of columns that would be provided for using the vindex.column_vindex
- hashing function each column will use to provide hash value for that columncolumn_bytes
- bytes to be used from each column's hash value after applying hashing function on it to produce keyspace id.Usage in VSchema:
column_count
is the mandatory parameter that needs to be provided.A maximum of 8 columns can be used in this vindex i.e.
column_count <= 8
column_vindex
should contain the vindex name in a comma-separated list. It should be less than equal to column_count.Default vindex is
hash
vindex, any column for which vindex is not provided, the default vindex will be used.Vindex in
column_vindex
should implement the below interface otherwise the initialization will fail.column_bytes
should contain bytes in a comma-separated list. The total count should be equal to 8 bytes.If for some columns bytes are not represented then it is calculated by assigning equal bytes to remaining unassigned columns.
Eg:
Related Issue(s)
Checklist