Re: [HACKERS] Cube extension point support // GSoC'13

From: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
To: Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, pgsql-students(at)postgresql(dot)org
Subject: Re: [HACKERS] Cube extension point support // GSoC'13
Date: 2013-07-17 07:49:51
Message-ID: CAPpHfdstQGbDdd=a9i_MUA0t_xfkHzktazKYcguwOxM4=w1BMQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-students

On Fri, Jul 12, 2013 at 3:57 PM, Stas Kelvich <stas(dot)kelvich(at)gmail(dot)com>wrote:

> Hello.
>
> here is a patch adding to cube extension support for compressed
> representation of point cubes. If cube is a point, i.e. has coincident
> lower left and upper right corners, than only one corner is stored. First
> bit of the cube header indicates whether the cube is point or not. Few
> moments:
>
> * Patch preserves binary compatibility with old indices
>

New representation of points will work in both index and heap. So, we
should speak about just compatibility with old cubes.

> * All functions that create cubes from user input, check whether it is a
> point or not
> * All internal functions that can return cubes takes care of all cases
> where a cube might become a point
> * Added tests for checking correct point behavior
>
> Also this patch includes adapted Alexander Korotkov's patch with kNN-based
> ordering operator, which he wrote for postgresql-9.0beta1 with knngist
> patch. More info there
> http://www.postgresql.org/message-id/AANLkTimhFaq6hCibRnk0tlcQMIyhYWHwAQ2ZD87wbH86@mail.gmail.com
>

I think ordering operator should be extracted into separated patch together
with another ordering operators of your project.

Patch contains some formatting issues. For example, this comment

/* Point can arise in two cases:
1) When argument is point and r == 0
2) When all coordinates was set to their averages */

should contain star sign on the beginning of each line. Also it will be
reflowed by pgindent. Correct formatting for this comment should look like
this:

/*--------------------------------------------------
* Point can arise in two cases:
* 1) When argument is point and r == 0
* 2) When all coordinates was set to their averages
*/

See coding convention for details:
http://www.postgresql.org/docs/current/static/source-format.html

------
With best regards,
Alexander Korotkov.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Page 2013-07-17 08:20:05 Re: Adding optionally commit number in PG_VERSION_STR
Previous Message Erik Rijkers 2013-07-17 06:43:23 Re: Adding optionally commit number in PG_VERSION_STR

Browse pgsql-students by date

  From Date Subject
Next Message Josh Berkus 2013-07-18 23:37:12 PostgreSQL Travel offer for current GSOC students
Previous Message Stas Kelvich 2013-07-12 11:57:49 Cube extension point support // GSoC'13