antares icon indicating copy to clipboard operation
antares copied to clipboard

Query results do not include column values for column with duplicate name

Open kenstir opened this issue 8 months ago • 3 comments

Describe the bug If the query results in two columns with the same name, the second column values not shown but the column header is shown. This leads to a poor display where the column does not match the values.

To Reproduce Steps to reproduce the behavior:

  1. Create an SQLite3 database:
    CREATE TABLE filter (
        id INTEGER PRIMARY KEY,
        name TEXT NOT NULL
    );
    CREATE TABLE action (
        id INTEGER PRIMARY KEY,
        name TEXT NOT NULL,
        filter_id INTEGER,
        FOREIGN KEY (filter_id) REFERENCES filter(id)
    );
    insert into filter (name) values ('filter1');
    insert into action (name, filter_id) values ('action1', 1);
    
  2. Connect to the DB.
  3. Run the following query:
    select f.name, a.name, a.id
    from filter f join action a on a.filter_id=f.id
    order by 1, a.id;
    
  4. Notice that the id value appears under the name column header.

Expected behavior I expected column values.

Application (please complete the following information):

  • App client SQLite
  • App version 0.7.34
  • Installation source: Microsoft Store

Environment (please complete the following information):

  • OS name: Windows 11
  • OS version 24H2
  • DB name SQLite
  • DB version 3.37.2

Screenshots

Image

kenstir avatar Apr 13 '25 18:04 kenstir

This sounds suspiciously like #848 -- which has been fixed. Which version of antares do you have?

bart-schaefer avatar Apr 16 '25 23:04 bart-schaefer

I am using 0.7.34 installed through the Microsoft Store. I didn't try any other DB than SQLite, but I did provide a repro case.

kenstir avatar Apr 17 '25 00:04 kenstir

I found a somewhat similar problem in PostgreSQL, if I do: SELECT 1, 2, 3; I only get 1 column with the name "?column?" and the value "3". If I execute the same query on the console app of postgre instead (psql) I get three columns all named "?column?" and with the value 1 in the first column, 2 in the second and 3 in the third column.

This might be related to the issues other's have, I'm also on the latest version.

eliasHeyndrickx avatar Apr 19 '25 16:04 eliasHeyndrickx