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

Result rows with only empty strings are shown with almost invisible height #1430

Open
3 of 5 tasks
wilcoxjay opened this issue Jan 28, 2025 · 0 comments
Open
3 of 5 tasks
Labels

Comments

@wilcoxjay
Copy link

Consider the following simple SQL scenario:

CREATE TABLE foo (bar TEXT);

INSERT INTO foo
  VALUES
    ('hello'),
    (''),
    ('world'),
    ('!');

SELECT * FROM foo;

Running these statements against a SQLite database gives the following results in the SQLTools UI:

Image

Unless you look very carefully (or you look at the row count in the bottom right!), you would be forgiven for thinking there are only 3 rows, because the row with the empty string is being vertically compressed to almost nothing.

To illustrate that the row is actually there, we can run this modified query:

SELECT *, 1 FROM foo;

which gives this result in the UI:

Image

I'm not sure if this qualifies as a "bug" exactly, but having taught using SQLTools to undergrads who know how to program but don't know SQL, I can attest to the fact that several of them were very confused by this.

I tested on Postgres as well and the results are similar, so it doesn't seem to depend on the database system being used, but rather the SQLTools UI.

Desktop (please complete the following information):

  • SQLTools Version: 0.28.3
  • VS Code Version: 1.96.4 (Universal) Commit: cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba
  • OS: macOS 13.7 on M1 hardware
  • Driver:
    • PostgreSQL/Redshift
    • MySQL/MariaDB
    • MSSQL/Azure
    • SQLite
    • Other? Probably all of them but I only tested SQLite and Postgres
  • Database version: SQLite version 3.39.3 (but the exact version doesn't seem to be relevant)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant