vscode-sqltools icon indicating copy to clipboard operation
vscode-sqltools copied to clipboard

Output tab doesn't return BLANK value

Open GammaSquare opened this issue 2 years ago • 1 comments

With a Snowflake connection, the output tab doesn't return a row when the value is ''. The value NULL is properly returned but BLANK is not, which is misleading. (I haven't had time to test on other databases, but the bug seems to be in the output tab, not related to the DB engine)

I've used this script to confirm:

CREATE TEMP TABLE DEBUG
(
FRUIT VARCHAR(32)
)

INSERT OVERWRITE INTO DEBUG (FRUIT)
VALUES (''),('APPLE'),('PEACH'),(NULL);

SELECT * 
FROM DEBUG;

The output tab mentions 1-4 of 4 rows but the tab includes only:

APPLE
PEACH
NULL

I can't highlight the 4th row with a space inside. This is an issue as NULLs aren't joined in Snowflake but spaces do, and with the current result, it's difficult to find where the issue is.

image image

The solution would be to include the row number next to each row, similarly to what we can see in the Snowflake UI. It would be something like:

1. 
2. APPLE
2. PEACH
3. NULL

Thanks in advance!

GammaSquare avatar Nov 12 '21 11:11 GammaSquare

Related to #900

gjsjohnmurray avatar Jul 22 '22 21:07 gjsjohnmurray

Confirmed still happening in current versions (PG driver used here): image

gjsjohnmurray avatar Sep 28 '22 10:09 gjsjohnmurray

Results opened in JSON format: image

gjsjohnmurray avatar Sep 28 '22 10:09 gjsjohnmurray