-
Notifications
You must be signed in to change notification settings - Fork 216
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
feat(binder): support “primary key (a, b)” syntax #631
Conversation
Signed-off-by: Shmiwy <[email protected]>
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.
LGTM, good work!
table_catalog.add_column(col_catalog).unwrap(); | ||
} | ||
|
||
table_catalog.set_primary_key_ids(&pk_ids); |
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.
It seems that this logic still cannot tell the difference between primary key (a, b)
and primary key (b, a)
? May fix this in later PRs.
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.
primary_key_ids
is a vector, maybe we can tell the difference by index?
primary key (a, b)
syntax.
primary key (a, b)
syntax.primary key (a, b)
syntax
primary_key_ids is vector, maybe we can tell the difference by index? risinglight/src/catalog/table.rs Lines 15 to 25 in d28389a
|
primary key (a, b)
syntax
But when generating |
oh, I forget this... |
May also add a test case for this in the future :) |
Signed-off-by: Shmiwy [email protected]
#625 1st editon
support primary key (a, b) syntax by adding a field called
primary_key_ids
inTableCatalog
without removngis_primary field
fromColumnDesc
. I will removeis_primary
and refactor code when I want to extend the case to multiple sort keys.