-
Notifications
You must be signed in to change notification settings - Fork 575
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
fix(expr): array_length
and cardinality
returns int32 as in PostgreSQL
#10267
Conversation
#[function("array_length(list, int32) -> int32")] | ||
fn array_length_of_dim(array: ListRef<'_>, d: i32) -> Result<Option<i32>, ExprError> { |
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.
This variant is just added by #10197 and we do not need to worry about backward compatibly.
Codecov Report
@@ Coverage Diff @@
## main #10267 +/- ##
=======================================
Coverage 70.58% 70.59%
=======================================
Files 1245 1245
Lines 212653 212733 +80
=======================================
+ Hits 150096 150169 +73
- Misses 62557 62564 +7
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 4 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Eventually it is still better to clean them up from the function signature map.
Do you have any plan or idea about how to clean it?
I listed the non-unique signatures in a test. |
335bd34
to
8177f86
Compare
|
…reSQL (#10267) Co-authored-by: xxchan <xxchan22f@gmail.com>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
Since this commit, the frontend will generate plans with
int32
.For backward compatibility, the backend will run both
int32
andint64
variants as requested by the query plan.Note: Having both
cardinality(list) -> int32
andcardinality(list) -> int64
in the function signature map means the type inferring logic cannot find a unique match. But we have them covered ininfer_type_for_special
to always returnint32
. Eventually it is still better to clean them up from the function signature map.Checklist For Contributors
./risedev check
(or alias,./risedev c
)Documentation
Types of user-facing changes
Release note
array_length
andcardinality
returns int32 as in PostgreSQL