Skip to content

null_count in describe() does not show zero when there is no null value in the array #10231

@chingren-ooi

Description

@chingren-ooi

Describe the bug

Hello, I'm using the input file datafusion/core/tests/data/cars.csv and running the describe() function. Below is the output of the describe() function:

+------------+-------+-------------------+---------------------+
| describe   | car   | speed             | time                |
+------------+-------+-------------------+---------------------+
| count      | 25    | 25.0              | 25                  |
| null_count | 25    | 25.0              | 25                  |
| mean       | null  | 11.84             | null                |
| std        | null  | 6.456456716600317 | null                |
| min        | green | 0.0               | 1996-04-12T12:05:03 |
| max        | red   | 21.5              | 1996-04-12T12:05:15 |
| median     | null  | 11.0              | null                |
+------------+-------+-------------------+---------------------+

I'm wondering, shouldn't the null_count be 0 if there are no null values in the array? Could this be considered a bug?

To Reproduce

No response

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions