malloydata / malloy

Malloy is an experimental language for describing data relationships and transformations.
http://www.malloydata.dev
MIT License
1.96k stars 76 forks source link

When using refinements, unsupported type appears in JSON but not in HTML #1764

Closed bporterfield closed 2 months ago

bporterfield commented 2 months ago

What happens?

Some fields that are of unsupported type (uuid in postgres, in this case) will show up as a column in a query, as expected. However, when using refinements and adding an existing view, the fields appear in the JSON response but do not appear in the HTML.

    view: chat_detail is {
        group_by: 
            `chat id` is id,
            model_message_text, 
            chat_date, 
            `user name` is user.name,
            user.email
    }

Running the view above shows "chat id" as a column. However, running the query below does not show "chat id" as a column:

run: chat -> { 
  where: 
    user.name = 'Ben',
} + chat_detail

When running this, chat id is not shown in HTML, but it does appear in the JSON response:

Screenshot 2024-07-11 at 9 13 59 AM Screenshot 2024-07-11 at 9 13 35 AM

However, if I change chat id definition in the view to:

`chat id` is id::string,

Now chat id appears in the HTML response as well as JSON

To Reproduce

see above

OS:

macOS

Malloy Client:

local VSCode

Malloy Client Version:

latest

Database Connection:

Postgres