-
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
feat: add map type to scalar/array/expr #17690
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
c00c228
to
39a86ad
Compare
a31225a
to
45df1da
Compare
42b515a
to
6fd081f
Compare
185dac7
to
dcb565e
Compare
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.
Generally LGTM!
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.
(posting some incomplete review comments first)
// XXX: can we unify this with FUNC_SIG_MAP? | ||
// For raw_call here, it seems unnecessary to declare it again here. | ||
// For some functions, we have validation logic here. Is it still useful now? |
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.
Short answer: we could rely more on FUNC_SIG_MAP
when no rewrite needed but it wont unify all special rewrites. Actually PostgreSQL does some rewrites in the sqlparser yacc/bison file, which also feels pretty dirty.
https://github.com/postgres/postgres/blob/REL_16_3/src/backend/parser/gram.y#L14527-L14535
Signed-off-by: xxchan <[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.
L🥰TM
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
First part of #17743.
Design/background doc: https://www.notion.so/risingwave-labs/Map-type-788a6cb277de46669052683493a5d170
Only the data structures are implemented. (So it's not ready for users yet.) Other things, which should be done in the frontend, like literal syntax etc are left to next PRs.
Basically
Map = List<Struct<"key":K, "value":V>>
:A minimal working example:
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.