jshumway-zs opened a new issue, #25307: URL: https://github.com/apache/superset/issues/25307
A clear and concise description of what the bug is. Data preview for trino tables does not work for all trino connectors (specifically for iceberg in our case). This issue results because the response from "select * from table$partitions" is dependent on the connection type (this is used in superset/db_engine_specs/presto.py). It seems that the code was written based off of the response for a [hive](https://trino.io/docs/current/connector/hive.html#partitions-table) connection, but the response schema is different for other connection types (see the iceberg docs [here](https://trino.io/docs/current/connector/iceberg.html#partitions-table) for example). #### How to reproduce the bug 1. create an iceberg table in trino 2. perform an action which will trigger a table preview on the table (such as selecting the table from the dropdowns in sqllab) 3. you will see an error such as "column 'partition' cannot be resolved" ### Expected results The preview should run properly and display the data preview ### Actual results The preview fails and an error message is shown #### Screenshots  ### Environment (please complete the following information): - superset version: 2.1.1 ### Additional context I have fixed this on our end by checking if the returned partition columns match the schema described in the iceberg documentation and if so, I return None. However this doesn't allow us to see the most recent partition and is also specific to iceberg. I would recommend setting latest_partition to False in the select_star method for trino until a better solution is found, as selecting from the most recent partition isn't critical in most cases. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org