-
Notifications
You must be signed in to change notification settings - Fork 594
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
frontend: refactor source schema resolution #9828
Labels
Milestone
Comments
BugenZhao
added
component/frontend
Protocol, parsing, binder.
component/connector
type/refactor
labels
May 16, 2023
LGTM |
before we determine use AST structure as the interface of the source schema resolution, I'd like to do some refactor on the function and try to make it better. 🤔 |
Is it finished? |
I think not |
This was referenced Jun 18, 2024
9 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Generally, there're multiple sources of truth for the catalog derived from a
CREATE SOURCE
orCREATE TABLE
statement.key INT PRIMARY KEY
PRIMARY KEY (key)
ROW SCHEMA LOCATION '..'
Given a parsed
CREATE
statement, it seems not that intuitive to decide the order of the steps for resolving each of them. In the current implementation, we...PRIMARY KEY
column constraintsPRIMARY KEY
table constraintrow_id
column if necessaryGENERATED
column constraints (since we just have all columns resolved)It's obvious to see that the procedure is somehow complicated and can be confusing, especially for step 5 which is too ad-hoc. Here I propose we let step 5 directly operate on the AST structure ahead of time, making all other binding steps work on an immutable and final
CREATE
statement AST. The advantages could be...ColumnIdGenerator
and can be problematic if we supportALTER TABLE
with connector (fix(frontend): dedup column ids (close #7905) #7972 (comment))SHOW CREATE TABLE my_external_catalog.my_table
(discussion: Support creating lakehouse catalog in risingwave. #8603)Feel free to comment. cc @tabVersion @st1page @xiangjinwu @yuhao-su
The text was updated successfully, but these errors were encountered: