1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

initial support for vector indexes

MDEV-33407 Parser support for vector indexes

The syntax is

  create table t1 (... vector index (v) ...);

limitation:
* v is a binary string and NOT NULL
* only one vector index per table
* temporary tables are not supported

MDEV-33404 Engine-independent indexes: subtable method

added support for so-called "high level indexes", they are not visible
to the storage engine, implemented on the sql level. For every such
an index in a table, say, t1, the server implicitly creates a second
table named, like, t1#i#05 (where "05" is the index number in t1).
This table has a fixed structure, no frm, not accessible directly,
doesn't go into the table cache, needs no MDLs.

MDEV-33406 basic optimizer support for k-NN searches

for a query like SELECT ... ORDER BY func() optimizer will use
item_func->part_of_sortkey() to decide what keys can be used
to resolve ORDER BY.
This commit is contained in:
Sergei Golubchik
2024-01-17 15:32:45 +01:00
parent 9ccf02a9a7
commit d6add9a03d
28 changed files with 888 additions and 89 deletions

View File

@ -4239,6 +4239,11 @@ public:
const handler *file) const;
virtual bool Key_part_spec_init_spatial(Key_part_spec *part,
const Column_definition &def) const;
virtual bool Key_part_spec_init_vector(Key_part_spec *part,
const Column_definition &def) const
{
return true; // Error
}
virtual bool Key_part_spec_init_ft(Key_part_spec *part,
const Column_definition &def) const
{
@ -7223,6 +7228,8 @@ public:
ulonglong table_flags) const override;
bool Key_part_spec_init_ft(Key_part_spec *part,
const Column_definition &def) const override;
bool Key_part_spec_init_vector(Key_part_spec *part,
const Column_definition &def) const override;
Field *make_table_field(MEM_ROOT *root,
const LEX_CSTRING *name,
const Record_addr &addr,
@ -7320,6 +7327,8 @@ public:
ulonglong table_flags) const override;
bool Key_part_spec_init_ft(Key_part_spec *part,
const Column_definition &def) const override;
bool Key_part_spec_init_vector(Key_part_spec *part,
const Column_definition &def) const override;
Field *make_table_field(MEM_ROOT *root,
const LEX_CSTRING *name,
const Record_addr &addr,
@ -7422,6 +7431,8 @@ public:
uchar *buff) const override;
bool Key_part_spec_init_ft(Key_part_spec *part,
const Column_definition &def) const override;
bool Key_part_spec_init_vector(Key_part_spec *part,
const Column_definition &def) const override;
bool Key_part_spec_init_primary(Key_part_spec *part,
const Column_definition &def,
const handler *file) const override;