Skip to content
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

Handle non-compliant behaviour of Exasol cursor #28744

Merged

Conversation

potiuk
Copy link
Member

@potiuk potiuk commented Jan 5, 2023

Exasol is not DBAPI-2 compliant, as described in:
https://github.com/exasol/pyexasol/blob/master/docs/DBAPI_COMPAT.md

This means that SQLOperator cannot be used for it and we should undeprecate the original operator and use specific Exasol handler as default for the returned values.

We also add explicit exception in case non-compliant DB2-API database (with missing description) is used with default Operator and handlers.

Fixes: #28731


^ Add meaningful description above

Read the Pull Request Guidelines for more information.
In case of fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in a newsfragment file, named {pr_number}.significant.rst or {issue_number}.significant.rst, in newsfragments.

@potiuk
Copy link
Member Author

potiuk commented Jan 5, 2023

cc: @kazanzhy

@potiuk potiuk force-pushed the handle-exasol-non-dbapi-2-compliant-behaviour branch 2 times, most recently from 23f85d4 to 7c63721 Compare January 7, 2023 22:57
Exasol is not DBAPI-2 compliant, as described in:
https://github.com/exasol/pyexasol/blob/master/docs/DBAPI_COMPAT.md

This means that SQLOperator cannot be used for it and we should
undeprecate the original operator and use specific Exasol handler
as default for the returned values.

We also add explicit exception in case non-compliant DB2-API
database (with missing description) is used with default Operator
and handlers.

Fixes: apache#28731
@potiuk potiuk force-pushed the handle-exasol-non-dbapi-2-compliant-behaviour branch from 7c63721 to f2ab384 Compare January 8, 2023 22:48
@potiuk
Copy link
Member Author

potiuk commented Jan 9, 2023

Fix verified by the user : #28731 (comment) - also fixed all the tests to reflect it.

@eladkal
Copy link
Contributor

eladkal commented Jan 9, 2023

I think should also increase minimum common.sql version in exasol provider as part of this PR

@potiuk
Copy link
Member Author

potiuk commented Jan 9, 2023

I think should also increase minimum common.sql version in exasol provider as part of this PR

No need. The only difference in common.sql is to raise better exception if someone wants to use directly common.sql operator on Exasol with default handler. All the rest will work regardless from common.sql version.

@potiuk potiuk merged commit 9a7f074 into apache:main Jan 9, 2023
@potiuk potiuk deleted the handle-exasol-non-dbapi-2-compliant-behaviour branch January 9, 2023 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'ExaStatement' object has no attribute 'description'
3 participants