-
Notifications
You must be signed in to change notification settings - Fork 152
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
Fix fallback to NullType when dialect type not found #215
base: main
Are you sure you want to change the base?
Conversation
Ok tested this workaround on few tables that contain geography and without it, now it works! |
886afd0
to
af47a68
Compare
Could you help to merge this bug fix asap please? As we temporarily patched the dialect on our end. |
We have same problem with dialect. Can you please merge this pull request. @sfc-gh-kwagner @sfc-gh-mkeller |
@@ -380,8 +380,7 @@ def _get_schema_columns(self, connection, schema, **kw): | |||
(sqltypes.String, sqltypes.BINARY)): | |||
col_type_kw['length'] = character_maximum_length | |||
|
|||
type_instance = col_type(**col_type_kw) | |||
|
|||
type_instance = col_type if isinstance(col_type, sqltypes.NullType) else col_type(**col_type_kw) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We probably need the same change at line 453
Any plans to merge this? This looks like a good hotfix to integrate. |
+1 GEOGRAPHY columns are causing issues |
+1 for merge request. |
+1 on the merge request. I have verified that applying this change resolves my issues. |
GEOGRAPHY custom type is not supported yet. Decided to fix issue similarly how sqlalchemy/postgresql dialect fixes it using sqlalchemy generic type called NULLTYPE. For more information see here
Root cause:
sqltypes.NULLTYPE
is already an instance of sqltypes.NullType, however when type is not supported logic does not account for that and tries to initalize already initialized instance.Related Issue: #194