-
Notifications
You must be signed in to change notification settings - Fork 9
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
Adds the COLL_* functions (COLL_AVG, COLL_COUNT, COLL_MAX, COLL_MIN, COLL_SUM) #353
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #353 +/- ##
==========================================
+ Coverage 81.44% 81.46% +0.02%
==========================================
Files 51 44 -7
Lines 11579 10903 -676
==========================================
- Hits 9430 8882 -548
+ Misses 2149 2021 -128
☔ View full report in Codecov by Sentry. |
Conformance comparison report
Number passing in both: 2766 Number failing in both: 410 Number passing in Base (425d3cc) but now fail: 0 Number failing in Base (425d3cc) but now pass: 67 The following test(s) were previously failing but now pass. Before merging, confirm they are intended to pass: Click here to see
|
#[track_caller] | ||
fn coll_avg(elems: Vec<&Value>) -> Value { | ||
if elems.is_empty() { | ||
Null |
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.
All of these implementations return Null
if the collection is empty. But I don't think any tests or conformance tests exist to verify this.
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.
They all return Null
on an empty collection other than COLL_COUNT
which returns 0
. Those conformance tests were added in partiql/partiql-tests@f00114d, which doesn't seem to be in this PR. I'll update the test submodule to the more recent version.
Note: from #372, |
Implements the
COLL_
functions (COLL_AVG
,COLL_COUNT
,COLL_MAX
,COLL_MIN
,COLL_SUM
). AlsoBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.