Re: [PATCH] kNN for btree
Nikita Glukhov <n.gluhov@postgrespro.ru>
From: Nikita Glukhov <n.gluhov@postgrespro.ru>
To: Michael Paquier <michael@paquier.xyz>,
Alexander Korotkov <a.korotkov@postgrespro.ru>
Cc: Dmitry Dolgov <9erthalion6@gmail.com>, David Steele
<david@pgmasters.net>, Robert Haas <robertmhaas@gmail.com>,
Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2019-02-20T01:18:56Z
Lists: pgsql-hackers
Attachments
- 0001-Fix-get_index_column_opclass-v06.patch (text/x-patch) patch v6-0001
- 0002-Introduce-ammatchorderby-function-v06.patch (text/x-patch) patch v6-0002
- 0003-Extract-structure-BTScanState-v06.patch (text/x-patch) patch v6-0003
- 0004-Add-kNN-support-to-btree-v06.patch (text/x-patch) patch v6-0004
- 0005-Add-btree-distance-operators-v06.patch (text/x-patch) patch v6-0005
- 0006-Remove-distance-operators-from-btree_gist-v06.patch (text/x-patch) patch v6-0006
- 0007-Add-regression-tests-for-kNN-btree-v06.patch (text/x-patch) patch v6-0007
- 0008-Allow-ammatchorderby-to-return-pathkey-sublists-v06.patch (text/x-patch) patch v6-0008
- 0009-Add-support-of-array-ops-to-btree-kNN-v06.patch (text/x-patch) patch v6-0009
On 04.02.2019 8:35, Michael Paquier wrote:
> This patch set needs a rebase because of conflicts caused by the
> recent patches for pluggable storage.
Attached 6th version of the patches rebased onto current master:
* index_clauses now also passed into ammatchorderby()
* added support for queries like
SELECT * FROM tab WHERE col1 = val1 AND col2 = val2 ORDER BY col3 <-> val3
* (experimental patch #9)
added support for queries like
SELECT * FROM tab WHERE col1 IN (v1, v2, v3) ORDER BY col1, col2 <-> val
Patch #9 is experimental. In order to distinguish order-by-operator and
simple order-by-column clauses (index column can be operator expression)
in orderbyclauses lists I am trying to pass negative column numbers in
orderbyclausecols, but it looks ugly, so I think orderbyclauses passing needs
some refactoring like recent IndexClause refactoring. Also I doubt that I
correctly implemented match_pathkey_to_indexcol().
--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Commits
-
Enhance nbtree ScalarArrayOp execution.
- 5bf748b86bc6 17.0 cited
-
Fix handling of non-key columns get_index_column_opclass()
- c6ce5f71b082 12.0 landed
- 7e0416039046 13.0 landed
-
Add SQL-accessible functions for inspecting index AM properties.
- ed0097e4f9e6 9.6.0 cited