Skip to content

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

@rohityadav1993

Description

@rohityadav1993

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions