[HACKERS] [PATCH] kNN for SP-GiST

Поиск
Список
Период
Сортировка
От Nikita Glukhov
Тема [HACKERS] [PATCH] kNN for SP-GiST
Дата
Msg-id 570825e8-47d0-4732-2bf6-88d67d2d51c8@postgrespro.ru
обсуждение исходный текст
Ответы Re: [HACKERS] [PATCH] kNN for SP-GiST  (Nikita Glukhov <n.gluhov@postgrespro.ru>)
Список pgsql-hackers
Hello hackers,

I'd like to present a series of patches which is a continuation of
Vlad Sterzhanov's work on kNN for SP-GiST that was done for GSOC'14.

Original thread: "KNN searches support for SP-GiST [GSOC'14]"
https://www.postgresql.org/message-id/CAK2aJC0-Jhrb3UjOZL+arBCHoTVwbeJVpRN-JOfEnN0vA6+MZQ@mail.gmail.com


I've done the following:
   * rebased onto HEAD
   * fixed several bugs
   * fixed indentation and unnecessary whitespace changes
   * implemented logic for order-by in spgvalidate() and spgproperty()
   * used pairing_heap instead of RBTree for the priority queue
     (as it was done earlier in GiST)
   * used existing traversalValue* fields instead of the newly added suppValue* fields
   * added caching of support functions infos
   * added recheck support for distances
   * refactored code
      - simplified some places
      - some functions were moved from spgproc.c to spgscan.c
        (now spgproc.c contains only one public function spg_point_distance()
         that can be moved somewhere and this file can be removed then)
      - extracted functions spgTestLeafTuple(), spgMakeInnerItem()
   * added new opclasses for circles and polygons with order-by-distance support
    (it was originally intended for kNN recheck testing)
   * improved tests for point_ops


Below is a very brief description of the patches:
1. Extracted two subroutines from GiST code (patch is the same as in "kNN for btree").
2. Exported two box functions that are used in patch 5.
3. Extracted subroutine from GiST code that is used in patch 4.
4. Main patch: added kNN support to SP-GiST.
5. Added ordering operators to kd_point_ops and quad_point_ops.
6. Added new SP-GiST support function spg_compress (gist_compress analogue)
     for compressed (lossy) representation of types in SP-GiST, used in patch 7.
7. Added new SP-GiST quad-tree opclasses for circles and polygons
     (reused existing quad-tree box_ops).

If you want to see the step-by-step sequence of changes applied to the original patch,
you can see it on my github: https://github.com/glukhovn/postgres/commits/knn_spgist

Please note that the tests for circle_ops and poly_ops will not work until
the а bug found in SP-GiST box_ops will not be fixed
(see https://www.postgresql.org/message-id/9ea5b157-478c-8874-bc9b-050076b7d042%40postgrespro.ru).

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



-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] pg_hba_file_settings view patch
Следующее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] patch proposal