trino-python-client icon indicating copy to clipboard operation
trino-python-client copied to clipboard

Sqlalchemy transactions with Repeatable_read

Open StephenOTT opened this issue 1 year ago • 4 comments

Expected behavior

dding a isolation level in the SA Session causes a failure when using any of the levels with underscores.

Trino client is removing the underscore, but then SA requires the underscore in downstream methods for a enum lookup.

Looking at the tests, it seems like it was not tested against the isolation levels with underscores.

Thanks.

Actual behavior

Fails

Steps To Reproduce

Use isolation level REPEATABLE_READ with SA

Log output

No response

Operating System

Windoss

Trino Python client version

Latest

Trino Server version

429

Python version

3.9

Are you willing to submit PR?

  • [X] Yes I am willing to submit a PR!

StephenOTT avatar Sep 05 '24 20:09 StephenOTT

Thank you for the report and being willing to submit a PR. I'll take a look at the PR once it's available.

hashhar avatar Sep 06 '24 05:09 hashhar

Hey @hashhar can you confirm for me: are transactions supported in the Postgres connector?

The docs seem to allude yes, but some ~random issues in this repo seem to indicate no.

StephenOTT avatar Sep 06 '24 12:09 StephenOTT

No. Transactions are emulated for the Hive connector only as far as I remember.

cc: @mosabua Maybe we should clarify this in the docs + check what's the long term plan around transactions - will they go away eventually since we can only try to "emulate" them?

hashhar avatar Sep 09 '24 13:09 hashhar

At the very least to add a big warning on this repos readme in the transaction section. :)

StephenOTT avatar Sep 11 '24 01:09 StephenOTT