Skip to content

Add support for MAP type to SQLAlchemy dialect #397

@dudu-upstream

Description

@dudu-upstream

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?

  • Yes I am willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions