-
Notifications
You must be signed in to change notification settings - Fork 536
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: support array containment @>, <@ (#13180) #13253
Conversation
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. Thank you!
Btw there is a darker side of PostgreSQL:
test=# select array[[2, 3], [4, 5]] @> array[3, 4];
?column?
----------
t
(1 row)
My suggestions is to merge the current matching-dimension version first, and consider this as an optional add-on. Although we do have ListRef::flatten
(instead of ListRef::iter
) and DataType::unnest_list
(instead of DataType::as_list
), the type handling logic may still be more complicated.
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! Thanks!
ok,I will consider this situation. |
To clarify, I am suggesting us to fix the e2e, skip the regress test, merge this PR of matching-dimension arrays, and then handle the flatten/unnest case in a separate PR (optional). |
ok,I will fix it later. And Launch two issues to track this unfinished work
|
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
Track the handling of nested types here: #13274 |
6fbb271
("array_contains", raw_call(ExprType::ArrayContains)), | ||
("arraycontains", raw_call(ExprType::ArrayContains)), | ||
("array_contained", raw_call(ExprType::ArrayContained)), | ||
("arraycontained", raw_call(ExprType::ArrayContained)), |
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.
Seems that these functions are not provided by PG, do we really need to expose these functions to our users? BTW, even if we decide to expose them, arraycontains
and arraycontained
seem unnecessary and for array_contains
and array_contained
we need to think about potential inalignment with PG if PG adds these functions with different signatures in the future.
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Checklist
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.