Skip to content

_process_type should call the compile of the dialect #17

Open
@YaPeL

Description

@YaPeL

Hi, I'm using sqlalchemy-diff with pybigquery, and it seems sqlalchemy-diff is having issues when attempting to process custom types, like an array, I get this error:

 File "/env/lib/python3.7/site-packages/sqlalchemydiff/comparer.py", line 349, in _process_types
    column_dict[column]['type'])
  File "/env/lib/python3.7/site-packages/sqlalchemydiff/comparer.py", line 359, in _process_type
    return type_.compile()
  File "/env/lib/python3.7/site-packages/sqlalchemy/sql/type_api.py", line 580, in compile
    return dialect.type_compiler.process(self)
  File "/env/lib/python3.7/site-packages/sqlalchemy/sql/compiler.py", line 400, in process
    return type_._compiler_dispatch(self, **kw)
  File "/env/lib/python3.7/site-packages/sqlalchemy/sql/visitors.py", line 89, in _compiler_dispatch
    raise exc.UnsupportedCompilationError(visitor, cls)
sqlalchemy.exc.UnsupportedCompilationError: Compiler <sqlalchemy.sql.compiler.GenericTypeCompiler object at 0x7f932a51ffd0> can't render element of type <class 'sqlalchemy.sql.sqltypes.ARRAY'> (Background on this error at: http://sqlalche.me/e/l7de)

which comes from the fact that, [I assume], _process_type is calling the default compiler and not the one from the dialect

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions