Skip to content

_process_type should call the compile of the dialect #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
YaPeL opened this issue Jun 14, 2019 · 0 comments
Open

_process_type should call the compile of the dialect #17

YaPeL opened this issue Jun 14, 2019 · 0 comments

Comments

@YaPeL
Copy link

YaPeL commented Jun 14, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant