Re: Bug in GiST paring heap comparator

Поиск
Список
Период
Сортировка
От Andrey Borodin
Тема Re: Bug in GiST paring heap comparator
Дата
Msg-id FB746354-B9E7-4CF4-9C26-F2471EEC5900@yandex-team.ru
обсуждение исходный текст
Ответ на Bug in GiST paring heap comparator  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Список pgsql-hackers

> 2 сент. 2019 г., в 9:54, Alexander Korotkov <a.korotkov@postgrespro.ru> написал(а):
>
> It appears to be related to implementation of comparison function in
> pairing heap used as priority queue for KNN.  It used plain float
> comparison, which doesn't handle Inf and Nan values well.  Attached
> patch replaced it with float8_cmp_internal().

Thanks! This patch fixes tests of my new GiST build :)

While patch looks good to me, I want to add that that there's a lot of <= and > comparisons in gistproc.c in function:

static float8
computeDistance(bool isLeaf, BOX *box, Point *point)

Should we fix this too? Or add comment why current code is safe.

Thanks!

Best regards, Andrey Borodin.


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

Предыдущее
От: amul sul
Дата:
Сообщение: Re: [HACKERS] advanced partition matching algorithm forpartition-wise join
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Bug in GiST paring heap comparator