mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-17 17:54:32 +08:00
Fixed results for NULL and NaN distances [skip ci]
This commit is contained in:
@@ -11,9 +11,20 @@ SELECT * FROM t ORDER BY val <=> '[3,3,3]';
|
||||
[1,2,4]
|
||||
(3 rows)
|
||||
|
||||
SELECT * FROM t ORDER BY val <=> '[0,0,0]';
|
||||
val
|
||||
---------
|
||||
[1,1,1]
|
||||
[1,2,4]
|
||||
[1,2,3]
|
||||
(3 rows)
|
||||
|
||||
SELECT * FROM t ORDER BY val <=> (SELECT NULL::vector);
|
||||
val
|
||||
-----
|
||||
(0 rows)
|
||||
val
|
||||
---------
|
||||
[1,1,1]
|
||||
[1,2,4]
|
||||
[1,2,3]
|
||||
(3 rows)
|
||||
|
||||
DROP TABLE t;
|
||||
|
||||
Reference in New Issue
Block a user