trinodb / trino-python-client

Python client for Trino
Apache License 2.0
307 stars 151 forks source link

Add support for MAP type to SQLAlchemy dialect #397

Closed dudu-upstream closed 4 months ago

dudu-upstream commented 11 months ago

Expected behavior

Im trying to describe some table schema that contains a column that is MAP data type but getting the following exception:

sqlalchemy.exc.CompileError: (in table 'MY_TABLE', column 'SOME_COLUMN'): Compiler <trino.sqlalchemy.compiler.TrinoTypeCompiler object at 0x110fb7d30> can't render element of type MAP

AttributeError: 'TrinoTypeCompiler' object has no attribute 'visit_MAP'

Actual behavior

AttributeError: 'TrinoTypeCompiler' object has no attribute 'visit_MAP'

Steps To Reproduce

create a new db connection and try to get a table schema

Log output

No response

Operating System

MacOS

Trino Python client version

0.326.0

Trino Server version

419

Python version

Python 3.9.17

Are you willing to submit PR?