Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved output of datafuson-cli with empty results #8904

Closed
alamb opened this issue Jan 18, 2024 · 3 comments · Fixed by #10300
Closed

Improved output of datafuson-cli with empty results #8904

alamb opened this issue Jan 18, 2024 · 3 comments · Fixed by #10300
Assignees
Labels
enhancement New feature or request

Comments

@alamb
Copy link
Contributor

alamb commented Jan 18, 2024

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

@alamb alamb added the enhancement New feature or request label Jan 18, 2024
@Tangruilin
Copy link
Contributor

I can help with this problem.

maybe it can be assign to me

@Tangruilin
Copy link
Contributor

@alamb

@alamb
Copy link
Contributor Author

alamb commented Jan 19, 2024

Thanks @Tangruilin

BTW I think the tests added in #8896 are sufficient -- if you make this change I think the existing tests can be updated and no new tests are needed

Tangruilin added a commit to Tangruilin/arrow-datafusion that referenced this issue Jan 22, 2024
Tangruilin added a commit to Tangruilin/arrow-datafusion that referenced this issue Jan 22, 2024
Tangruilin added a commit to Tangruilin/arrow-datafusion that referenced this issue Feb 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants