Skip to content

Improved output of datafuson-cli with empty results #8904

@alamb

Description

@alamb

Is your feature request related to a problem or challenge?

As @Jefffrey @crepererum and @berkaysynnada pointed out on #8895 (see #8895 (comment)), the handling of results that have no rows could potentially be improved

datafusion-cli
seleDataFusion CLI v34.0.0
❯ select * from (values (1));
+---------+
| column1 |
+---------+
| 1       |
+---------+
1 row in set. Query took 0.009 seconds.

❯ select * from (values (1)) where column1 = 2;
0 rows in set. Query took 0.003 seconds.

Note there is nothing printed out from select * from (values (1)) where column1 = 2; (not even headers) when there are no results

Describe the solution you'd like

It would be nice to print out headers even when there was no result:

So something like:

select * from (values (1)) where column1 = 2;
+---------+
| column1 |
+---------+
+---------+

Describe alternatives you've considered

We can also do nothing

Additional context

This issue itself isn't particularly pressing in my opinion

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions