Skip to content
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

SUM for only NULL values #1533

Closed
mathiasrw opened this issue Oct 26, 2022 · 3 comments
Closed

SUM for only NULL values #1533

mathiasrw opened this issue Oct 26, 2022 · 3 comments

Comments

@mathiasrw
Copy link
Member

mathiasrw commented Oct 26, 2022

Spawn from https://github.com/AlaSQL/alasql-sqllogictest/blob/a10ff82e75edafae2ce96c9d02ab47cfc85d4507/results/output.md#3620-testevidenceslt_lang_aggfunctest

SELECT sum(x) FROM t1 WHERE y='null'

Expected: ["NULL"] but got ["0"]

If there are no non-NULL input rows then sum() returns NULL but total() returns 0.0

@gangadhargo
Copy link
Contributor

Hi @mathiasrw

I tried to fix these issues. would you please verify my PR once?
#1537

Thanks
Ganga.

@mathiasrw
Copy link
Member Author

Uhh!

@mathiasrw
Copy link
Member Author

Released as part of v2.2.0

mathiasrw pushed a commit that referenced this issue Dec 10, 2022
alsundukov added a commit to akhaneev/alasql that referenced this issue Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants