Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX-25636] fix: re-enable schema previsualization for Trino/Presto t…
…able/schemas This patch fixes failures occuring when performing a schema preview of a Presto table. The `PrestoBaseEngineSpec.where_latest_partition` attempts to construct SQLAlchemy `Column` objects based on a name and a type. However, this leads to the following error in our case: ```console sqlalchemy.exc.ArgumentError: 'SchemaItem' object, such as a 'Column' or a 'Constraint' expected, got 'VARCHAR' ``` This comes from the fact that we run `Column('column_name', 'VARCHAR')` instead of `Column('column_name', sqlalchemy.types.VARCHAR)`. We fix this particular error by passing the _actual_ type class, and not just a string. > [!NOTE] > This also fixes the same issue for Trino tables, as `TrinoEngineSpec` inherits > from `PrestoBaseEngineSpec`, the Presto db client class. Fixes #25962 Fixes #25962
- Loading branch information