Skip to content

Inconsistent Explain units #24203

Description

@nuno-faria

Describe the bug

Some of the metrics in the explain plans have inconsistent units. For example:

output_bytes=7.5 GB
bytes_scanned=1.26 B

Here bytes_scanned is actually 1.26GB, but the formatting is misleading. The problem is that this is formatted with human_readable_count, while the output_bytes is formatted with human_readable_size (from datafusion/common/src/display/human_readable.rs).

Another issue is that size units are suffixed with K,M,G,T, while other units are K,M,B,T.

To Reproduce

Run EXPLAIN ANALYZE.

Expected behavior

I think it would be better to format all units with K,M,G,T, and remove the B suffix from the size metrics, since the names already contain the word "bytes". So the example above would be:

output_bytes=7.5 G
bytes_scanned=1.26 G

cc: @2010YOUY01 what do you think?

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions