]> 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:43:30 +0000 (11:43 -0400)
commit1b780ce3d3f7e33e5cc9e49eafa316a514cdc324
tree03a7b47ce35699e8d95e982ee3f04e4d63471d26
parent110632688bccfd59d7cf6ff6939b15c64eb0ea4d
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
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