cnosdb/cnosdb

[BUG]count(*)/exact_count(*) empty table come to nothing

Closed this issue · 0 comments

Describe the bug

version: cdf92a9
count()/exact_count() empty table come to nothing

To Reproduce

CREATE TABLE air(
visibility DOUBLE,
temperature DOUBLE,
pressure DOUBLE,
TAGS(station)
);

select count(*) from air;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| |
+-----------------+
Query took 0.032 seconds.

public ❯ select exact_count(*) from air;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
+-----------------+
Query took 0.022 seconds.

Expected behavior

select count(*) from air;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 0 |
+-----------------+
Query took 0.032 seconds.

public ❯ select exact_count(*) from air;
+-----------------+
| COUNT(UInt8(1)) |
+-----------------+
| 0 |
+-----------------+
Query took 0.022 seconds.

Additional context

No response