]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commit
Added vector datatype support in Oracle dialect
authorsuraj <suraj.shaw@oracle.com>
Mon, 5 May 2025 15:14:35 +0000 (11:14 -0400)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 5 May 2025 15:44:43 +0000 (11:44 -0400)
commit1ca4fe4159084c8ceda360f418c73118c4d15002
treed28272e80f6d26f97fd1b460857ef8f37695dae9
parente8750a5c7ea2039df9c14ec243330010cd3589fd
Added vector datatype support in Oracle dialect

Added new datatype :class:`_oracle.VECTOR` and accompanying DDL and DQL
support to fully support this type for Oracle Database. This change
includes the base :class:`_oracle.VECTOR` type that adds new type-specific
methods ``l2_distance``, ``cosine_distance``, ``inner_product`` as well as
new parameters ``oracle_vector`` for the :class:`.Index` construct,
allowing vector indexes to be configured, and ``oracle_fetch_approximate``
for the :meth:`.Select.fetch` clause.  Pull request courtesy Suraj Shaw.

Fixes: #12317
Closes: #12321
Pull-request: https://github.com/sqlalchemy/sqlalchemy/pull/12321
Pull-request-sha: a72a18a45c85ae7fa50a34e97ac642e16b463b54

Change-Id: I6f3af4623ce439d0820c14582cd129df293f0ba8
(cherry picked from commit 1b780ce3d3f7e33e5cc9e49eafa316a514cdc324)
doc/build/changelog/unreleased_20/12317.rst [new file with mode: 0644]
doc/build/dialects/oracle.rst
lib/sqlalchemy/dialects/oracle/__init__.py
lib/sqlalchemy/dialects/oracle/base.py
lib/sqlalchemy/dialects/oracle/vector.py [new file with mode: 0644]
lib/sqlalchemy/sql/selectable.py
test/dialect/oracle/test_compiler.py
test/dialect/oracle/test_reflection.py
test/dialect/oracle/test_types.py
test/sql/test_compare.py