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

regr_count should return an int #11726

Closed
Michael-J-Ward opened this issue Jul 30, 2024 · 0 comments · Fixed by #11731
Closed

regr_count should return an int #11726

Michael-J-Ward opened this issue Jul 30, 2024 · 0 comments · Fixed by #11731
Labels
bug Something isn't working

Comments

@Michael-J-Ward
Copy link
Contributor

Describe the bug

regr_count currently returns a Float64.

To Reproduce

DataFusion CLI v40.0.0
> select regr_count(1, 1);
+-------------------------------+
| regr_count(Int64(1),Int64(1)) |
+-------------------------------+
| 1.0                           |
+-------------------------------+
1 row(s) fetched. 
Elapsed 0.011 seconds.

> select arrow_typeof(regr_count(1, 1));
+---------------------------------------------+
| arrow_typeof(regr_count(Int64(1),Int64(1))) |
+---------------------------------------------+
| Float64                                     |
+---------------------------------------------+
1 row(s) fetched. 
Elapsed 0.001 seconds.

Expected behavior

Consistent with postgres, it should return Int64 or Uint64

https://www.postgresql.org/docs/9.4/functions-aggregate.html

Additional context

No response

@Michael-J-Ward Michael-J-Ward added the bug Something isn't working label Jul 30, 2024
Michael-J-Ward added a commit to Michael-J-Ward/datafusion that referenced this issue Jul 30, 2024
jayzhan211 pushed a commit that referenced this issue Jul 30, 2024
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant