Re: Fix picksplit with nan values
От | Alexander Korotkov |
---|---|
Тема | Re: Fix picksplit with nan values |
Дата | |
Msg-id | CAPpHfdsAbAy5DwWCgZbhB-+VysE8_rO06=PZHf+7rZ=PcZn8eg@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Fix picksplit with nan values (Andrew Gierth <andrew@tao11.riddles.org.uk>) |
Ответы |
Re: Fix picksplit with nan values
|
Список | pgsql-hackers |
On Mon, Sep 16, 2013 at 4:13 PM, Andrew Gierth <andrew@tao11.riddles.org.uk> wrote:
------
With best regards,
Alexander Korotkov.
>>>>> "Alexander" == Alexander Korotkov <aekorotkov@gmail.com> writes:
Alexander> 2) NaN coordinates should be processed in GiST index scan
Alexander> like in sequential scan.
postgres=# select * from pts order by a <-> '(0,0)' limit 10;
a
----------
(1,1)
(7,nan)
(9,nan)
(11,nan)
(4,nan)
(nan,6)
(2,1)
(1,2)
(2,2)
(3,1)
(10 rows)
postgres=# set enable_indexscan=false;
SET
postgres=# select * from pts order by a <-> '(0,0)' limit 10;
a
-------
(1,1)
(2,1)
(1,2)
(2,2)
(3,1)
(1,3)
(3,2)
(2,3)
(4,1)
(1,4)
(10 rows)
this data set was created by:
insert into pts
select point(i,j)
from (select generate_series(1,100)::float8 union all select 'nan') s1(i),
(select generate_series(1,100)::float8 union all select 'nan') s2(j)
order by random();
Thanks, Andrew! Good spot.
I didn't examine order by operators for work with NaNs.
I think this time problem is in GiST itself rather than in opclass. I'm going to fix it in a separate patch.
With best regards,
Alexander Korotkov.
В списке pgsql-hackers по дате отправления: