Closed TeddyCr closed 2 years ago
It should be fixed in https://github.com/trinodb/trino-python-client/pull/242. The new release including it will happen later today.
Can you try installing the client from master
branch and verify if it solves the get_table_names
case as well.
Awesome, thanks @hashhar
Once you verify we can be sure there's not another related bug.
Nevermind, thanks for including the simple repro steps, works on current master
:
>>> url_ = "trino://user:@localhost:8080/tpcds"
>>> engine = create_engine(url_)
>>> inspect(engine).get_table_names("sf1000")
['call_center', 'catalog_page', 'catalog_returns', 'catalog_sales', 'customer', 'customer_address', 'customer_demographics', 'date_dim', 'household_demographics', 'income_band', 'inventory', 'item', 'promotion', 'reason', 'ship_mode', 'store', 'store_returns', 'store_sales', 'time_dim', 'warehouse', 'web_page', 'web_returns', 'web_sales', 'web_site', 'dbgen_version']
I'm closing as fixed. It'll be available in 0.317.0 coming out later today.
Perfect. Thanks for the quick response
Fixed in #242 .
Expected behavior
I was expecting the list of tables to be returned (similar to what we can see with previous versions of trino -- tested up to 394).
Actual behavior
Trino raises the below error:
Details In
trino[sqlalchemy]==0.316.0
when iterating over results indbapi.py
line 333 and fetching the results inclient.py
line 723 it seems thatself._row_mapper
always evaluates toNone
. This causes lines 334-337 to never evaluate and therefore the method to raisetrino.exceptions.FailedToObtainAddedPrepareHeader
.In
trino[sqlalchemy]==0.313.0
inclient.py
line 677status
will never have arow
attribute asresponse
line 463 will never have adata
key.Steps To Reproduce
Log output
Operating System
macOS Monterey
Trino Python client version
0.313 and 0.316
Trino Server version
398
Python version
3.9.9
Are you willing to submit PR?