-
Notifications
You must be signed in to change notification settings - Fork 590
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
refactor(catalog): refactor system catalog using proc macro #14947
Conversation
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[email protected]>
Wow, this is a huge project. I'm curious how did you do such refactor efficiently? 😄 |
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[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.
LSTM!! rubber stamp for all writes on system catalog files.
Signed-off-by: Runji Wang <[email protected]>
Signed-off-by: Runji Wang <[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.
Approved as lock team member.
Signed-off-by: Runji Wang <[email protected]>
60547c8
to
adea7af
Compare
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
resolve #13433 following #14934
This PR refactors system catalog using the proc macro proposed in #13433, but in a slightly different way.
Instead of
#[derive(Catalog)]
, this PR introduces#[system_catalog]
macro (proposed by #13433 (comment)), which can be put on a function to define system table, or put on a struct to define system view.Similar to
#[function]
, these tables & views will be automatically registered into the globalSYS_CATALOGS
.Table/view ids are generated in lexicographic order of their name. Thus ids are unstable across different versions. Not sure if this is safe. Or we should assign static ids to them?
Checklist
./risedev check
(or alias,./risedev c
)Documentation
Release note
If this PR includes changes that directly affect users or other significant modifications relevant to the community, kindly draft a release note to provide a concise summary of these changes. Please prioritize highlighting the impact these changes will have on users.