Re: [HACKERS] Cube extension kNN support

2015-12-16 Thread Stas Kelvich
> I don't think that's what the comment says, actually. It rather refers to > code like this: > >result = Min(LL_COORD(c, n - 1), UR_COORD(c, n - 1)); > > i.e. if you specifically ask for a particular corner (ll, in this case), > you'll get the proper value. Hmm, I was confused by phrase “

Re: [HACKERS] Cube extension kNN support

2015-12-16 Thread Tomas Vondra
Hi, On 12/16/2015 01:26 PM, Stas Kelvich wrote: Hi, thanks for the review. 1) (nitpicking) There seem to be some minor whitespace issues, i.e. trailing spaces, empty lines being added/removed, etc. Fixed, I think 2) one of the regression tests started to fail SELECT '-1e-700'::cube

Re: [HACKERS] Cube extension kNN support

2015-12-16 Thread Stas Kelvich
Hi, thanks for the review. > 1) (nitpicking) There seem to be some minor whitespace issues, i.e. > trailing spaces, empty lines being added/removed, etc. Fixed, I think > 2) one of the regression tests started to fail > > SELECT '-1e-700'::cube AS cube; > > This used to return (0) but n

Re: [HACKERS] Cube extension kNN support

2015-12-15 Thread Tomas Vondra
Hi, On 12/07/2015 03:47 PM, Stas Kelvich wrote: Hello, fixed. I've looked at the patch today, seems mostly fine to me. Three comments though: 1) (nitpicking) There seem to be some minor whitespace issues, i.e. trailing spaces, empty lines being added/removed, etc. 2) one of the regressio

Re: [HACKERS] Cube extension kNN support

2015-12-07 Thread Stas Kelvich
Hello, fixed. cube_distances.diff Description: Binary data --- Stas Kelvich Postgres Professional: http://www.postgrespro.com Russian Postgres Company > On 01 Dec 2015, at 17:52, Teodor Sigaev wrote: > > Patch looks good, but there ara some review notices: > 1 gmake installcheck fails: > **

Re: [HACKERS] Cube extension kNN support

2015-12-01 Thread Teodor Sigaev
Patch looks good, but there ara some review notices: 1 gmake installcheck fails: *** /.../pgsql/contrib/cube/expected/cube_1.out 2015-12-01 17:49:01.768764000 +0300 --- /.../pgsql/contrib/cube/results/cube.out 2015-12-01 17:49:12.190818000 +0300 *** *** 1382,1388 (1 ro

Re: [HACKERS] Cube extension kNN support

2015-10-29 Thread Stas Kelvich
Hello. That is updated version of the patch with proper update scripts. Also i’ve noted that documentation states the wrong thing: “It does not matter which order the opposite corners of a cube are entered in. The cube functions automatically swap values if needed to create a uniform "lower le

Re: [HACKERS] Cube extension kNN support

2015-07-09 Thread Alexander Korotkov
Hi! On Sat, May 9, 2015 at 6:53 AM, Stas Kelvich wrote: > Patch is pretty ready, last issue was about changed extension interface, > so there should be migration script and version bump. > Attaching a version with all migration stuff. > I can't see cube--1.0--1.1.sql in the patch. Did forget to

Re: [HACKERS] Cube extension kNN support

2015-05-08 Thread Stas Kelvich
Hi! Patch is pretty ready, last issue was about changed extension interface, so there should be migration script and version bump. Attaching a version with all migration stuff. distances2r4.patch Description: Binary data Stas. > On 09 May 2015, at 05:20, Alvaro Herrera wrote: > > Sergey

Re: [HACKERS] Cube extension kNN support

2015-05-08 Thread Alvaro Herrera
Sergey Konoplev wrote: > On Thu, Mar 27, 2014 at 3:26 PM, Sergey Konoplev wrote: > > On Sun, Sep 22, 2013 at 4:38 PM, Stas Kelvich > > wrote: > >> Here is the patch that introduces kNN search for cubes with euclidean, > >> taxicab and chebyshev distances. > > > > What is the status of this patc

Re: [HACKERS] Cube extension kNN support

2015-04-03 Thread Alexander Korotkov
On Thu, Mar 12, 2015 at 8:43 PM, Stas Kelvich wrote: > Documentation along with style fix. > Since we change the interface of extension we have to change it version and create a migration script. E.g. you have to rename cube--1.0.sql to cube--1.1.sql and create cube--1.0--1.1.sql to migrate the

Re: [HACKERS] Cube extension kNN support

2015-03-12 Thread Stas Kelvich
Documentation along with style fix. distances2r3.patch Description: Binary data > On 08 Feb 2015, at 00:32, Alexander Korotkov wrote: > > Hi! > > On Sat, Feb 7, 2015 at 12:45 PM, Stas Kelvich wrote: > I had updated old patch with kNN operators for cube data structures. Copying > descripti

Re: [HACKERS] Cube extension kNN support

2015-02-07 Thread Alexander Korotkov
Hi! On Sat, Feb 7, 2015 at 12:45 PM, Stas Kelvich wrote: > I had updated old patch with kNN operators for cube data structures. > Copying description from old message: > > Following distance operators introduced: > > <#> taxicab distance > <-> euclidean distance > <=> chebyshev distance > > For

Re: [HACKERS] Cube extension kNN support

2015-02-07 Thread Stas Kelvich
Hi! I had updated old patch with kNN operators for cube data structures. Copying description from old message: Following distance operators introduced: <#> taxicab distance <-> euclidean distance <=> chebyshev distance For example: SELECT * FROM objects ORDER BY objects.coord <-> '(137,42,314

Re: [HACKERS] Cube extension kNN support

2014-03-31 Thread Sergey Konoplev
On Mon, Mar 31, 2014 at 12:09 PM, Alexander Korotkov wrote: >> I'm not sure if it is doable at all, but are there any possibility to >> implement here, or, what would be just great, any ready/half ready >> solutions of a Hamming distance based kNN search? > > Cube dealing with float8 numbers. Ther

Re: [HACKERS] Cube extension kNN support

2014-03-31 Thread Alexander Korotkov
On Mon, Mar 31, 2014 at 10:01 PM, Sergey Konoplev wrote: > On Thu, Mar 27, 2014 at 3:26 PM, Sergey Konoplev > wrote: > > On Sun, Sep 22, 2013 at 4:38 PM, Stas Kelvich > wrote: > >> Here is the patch that introduces kNN search for cubes with euclidean, > taxicab and chebyshev distances. > > > >

Re: [HACKERS] Cube extension kNN support

2014-03-31 Thread Sergey Konoplev
On Thu, Mar 27, 2014 at 3:26 PM, Sergey Konoplev wrote: > On Sun, Sep 22, 2013 at 4:38 PM, Stas Kelvich wrote: >> Here is the patch that introduces kNN search for cubes with euclidean, >> taxicab and chebyshev distances. > > What is the status of this patch? Referring to our private conversatio

Re: [HACKERS] Cube extension kNN support

2014-03-27 Thread Sergey Konoplev
Hi everyone, On Sun, Sep 22, 2013 at 4:38 PM, Stas Kelvich wrote: > Here is the patch that introduces kNN search for cubes with euclidean, > taxicab and chebyshev distances. What is the status of this patch? -- Kind regards, Sergey Konoplev PostgreSQL Consultant and DBA http://www.linkedin.c

Re: [HACKERS] Cube extension kNN support

2013-12-11 Thread Peter Eisentraut
cube.c: In function ‘g_cube_distance’: cube.c:1453:2: warning: ‘retval’ may be used uninitialized in this function [-Wmaybe-uninitialized] -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: [HACKERS] Cube extension kNN support

2013-12-03 Thread Stas Kelvich
Hi. > cube and earthdistance regression tests fail. Code updated to work with current HEAD. Also added tests to cover new functionality. > Do you have any benchmarks ? This patch just introduces functionality of calculating distances between cubes, so this code don't interfere much with kN

Re: [HACKERS] Cube extension kNN support

2013-09-25 Thread Peter Eisentraut
On 9/22/13 7:38 PM, Stas Kelvich wrote: > Here is the patch that introduces kNN search for cubes with euclidean, > taxicab and chebyshev distances. cube and earthdistance regression tests fail. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscr

Re: [HACKERS] Cube extension kNN support

2013-09-22 Thread Oleg Bartunov
Do you have any benchmarks ? On Mon, Sep 23, 2013 at 3:38 AM, Stas Kelvich wrote: > Hello, hackers. > > Here is the patch that introduces kNN search for cubes with euclidean, > taxicab and chebyshev distances. > > Following distance operators introduced: > > <#> taxicab distance > <-> euclidean

[HACKERS] Cube extension kNN support

2013-09-22 Thread Stas Kelvich
Hello, hackers. Here is the patch that introduces kNN search for cubes with euclidean, taxicab and chebyshev distances. Following distance operators introduced: <#> taxicab distance <-> euclidean distance <=> chebyshev distance For example: SELECT * FROM objects ORDER BY objects.coord <-> '(1