Re: [PATCH] kNN for btree - Mailing list pgsql-hackers

From Nikita Glukhov
Subject Re: [PATCH] kNN for btree
Date
Msg-id d5816c42-6ade-f101-5470-da4e67df694b@postgrespro.ru
Whole thread Raw
In response to Re: [PATCH] kNN for btree  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Responses Re: [PATCH] kNN for btree  (Thomas Munro <thomas.munro@gmail.com>)
Re: [PATCH] kNN for btree  (Alvaro Herrera <alvherre@2ndquadrant.com>)
List pgsql-hackers
Attached 13th version of the patches.
On 08.07.2019 21:09, Alexander Korotkov wrote:
I have more thoughts about planner/executor infrastructure.  It
appears that supporting "ORDER BY col1, col2 <-> val" is too complex
for initial version of patch.  Handling of "ORDER BY col" and "ORDER
BY col <-> val" cases uses different code paths in optimizer.

So, I'd like to limit first version of this patch to support just most
simple "ORDER BY col <-> val" case.  We would probably be able to
enhance it even in v13 release cycle, but let's start with just simple
case.  I also think we can evade replacing amcanorderbyop flag with
method, but introduce just new boolean flag indicating knn supports
only first column.
Now patches 1-8 implement only "ORDER BY col <-> const" case.
ammatchorderby() is replaced with amorderbyopfirstcol flag.
 
Patches 9-12 contain ammatchorderby() and other features, so they may 
not be reviewed right now.

On 08.07.2019 11:07, Thomas Munro wrote:
make check-world fails for me, and in tmp_install/log/install.log I see:
btree_int2.c:97:9: error: implicit declaration of function 'int2dist'
is invalid in C99 [-Werror,-Wimplicit-function-declaration]       return int2dist(fcinfo);              ^
btree_int2.c:97:9: note: did you mean 'int2_dist'?
btree_int2.c:95:1: note: 'int2_dist' declared here
int2_dist(PG_FUNCTION_ARGS)
^
1 error generated.
Fixed.

--
Nikita Glukhov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: idea: log_statement_sample_rate - bottom limit for sampling
Next
From: Mike Palmiotto
Date:
Subject: Re: [RFC] [PATCH] Flexible "partition pruning" hook