-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
Fixed #36148 -- Enabled native tuple comparison lookups on Oracle >= 23.4 and SQLite >= 3.37. #19107
Conversation
@cached_property | ||
def supports_tuple_comparison_lookups(self): | ||
# Support is known to be missing on 23.2 but available on 23.4. | ||
return self.connection.oracle_version >= (23, 4) |
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.
This can be handy in bulk_batch_size
as if this is supported we can likely avoid considering one placeholder per composite field see https://github.com/django/django/pull/19088/files#r1931008541.
bb6a5aa
to
6d0e2ce
Compare
6d0e2ce
to
9952fc4
Compare
Discovered that SQLite does support native tuple containment checks by digging a bit |
Oracle 23c has been rebranded to Oracle 23ai (starting with version 23.4), which would explain many new features in the "minor" release. |
@felixxm I just spent some more time going through the release notes again and I couldn't any mention of it. It might have been a feature that flew the radar though given that support the That would explain why Looking how we circumvented the lack of |
There we go it seems that we can work around the It appears that |
Unfortunately we had to revert 175b049 (see 5424151 and ticket-35655). |
The issue might only be for |
9952fc4
to
b6898ff
Compare
b6898ff
to
3016df2
Compare
3016df2
to
47ab068
Compare
This should allow third-party backends to define Tuple.as_vendor() overrides that are taken into consideration which calling as_sql() directly prevents.
…port. This should allow backends more easily opt-in or out of native support and rely on the fallback if unavailable.
…+ and Oracle 23.4+. VALUES must be explicitly specified when declaring a sequence of tuples on SQLite < 3.37 but it's not required on >= 3.37. See sqlite/sqlite@9289f51 which addressed the last remaining issue with IN.
1ae16d3
to
bfc7364
Compare
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.
Thanks 👍
Per discussion
Trac ticket number
ticket-36148
Branch description
I can't get my hands on Oracle <= 23.3 but I know that
ORACLE_VERSION=23.4.0.0 PYTHON_VERSION=3.12 docker compose run --rm oracle --parallel 1 --keepdb composite_pk
passesORACLE_VERSION=23.5.0.0 PYTHON_VERSION=3.12 docker compose run --rm oracle --parallel 1 --keepdb composite_pk
passes