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

Count(*) returns empty response when there are no segments #14629

Open
rohityadav1993 opened this issue Dec 10, 2024 · 2 comments
Open

Count(*) returns empty response when there are no segments #14629

rohityadav1993 opened this issue Dec 10, 2024 · 2 comments

Comments

@rohityadav1993
Copy link
Contributor

when doing a select count(*) from table_name query on a table with no segments, the response is empty instead of 0.

This is a correct behavour for non aggregation queries but for general aggregation queries where datatype is known a default value like 0 can be returned, e.g. sum(), count(), etc when there are no segments otherwise the caller needs to handle the empty rows scenario as well to prevent result parsing failures.

I'll be happy to contribute if we can get a confirmation if this is an intended behavior or can be improved.

Screenshot 2024-12-10 at 6 27 45 PM
@ankitsultana
Copy link
Contributor

I agree we should fix this and it's been a long standing annoyance.

FYI: we had found a somewhat related issue early on in the MSE: #10124, though in that case we were returning empty result-set even when the table had data.

@Jackie-Jiang
Copy link
Contributor

This is the same as #13057

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

4 participants