apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.91k stars 13.91k forks source link

Trino embedded rows lose their column names #30979

Open ilsaloving opened 2 days ago

ilsaloving commented 2 days ago

Bug description

I am using Trino to connect to Opensearch since Superset doesn't directly support it yet. When I do a query that contains embedded rows, superset does not display the headers for those rows, showing only "NULL".

I opened a ticket with Trino and they said it has to do with how Superset is calling the API.

https://github.com/trinodb/trino/issues/23758

Screenshots/recordings

image

Superset version

master / latest-dev

Python version

I don't know

Node version

16

Browser

Chrome

Additional context

Actually using 4.0.2 because I haven't been having difficulties trying to extend the docker image.

Logs did not indicate any errors.

Checklist

hashhar commented 1 day ago

For more context, we (trino python client maintainers) had been unable to find a standard way to expose field names for structural types (ROW in Trino's case, similar to STRUCT in BigQuery for example) so we implemented something in https://github.com/trinodb/trino-python-client/pull/335.

Superset can use those methods to retrieve the field names for nested types. Note that we don't use a dict to represent row types because the semantics are different and some valid ROW values cannot be represented as a dict and round-trip and equality becomes problematic so we are not open to changing that decision.