mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-03 11:10:56 +08:00
Added halfvec to distance functions TAP test
This commit is contained in:
@@ -40,7 +40,13 @@ for my $function (@functions)
|
||||
for my $query (@queries)
|
||||
{
|
||||
my $expected = $node->safe_psql("postgres", "SELECT $function(v, '$query') FROM tst");
|
||||
my $actual = $node->safe_psql("postgres", "SELECT $function(v::sparsevec, '$query'::vector::sparsevec) FROM tst");
|
||||
|
||||
# Test halfvec
|
||||
my $actual = $node->safe_psql("postgres", "SELECT $function(v::halfvec, '$query'::vector::halfvec) FROM tst");
|
||||
is($expected, $actual, $function);
|
||||
|
||||
# Test sparsevec
|
||||
$actual = $node->safe_psql("postgres", "SELECT $function(v::sparsevec, '$query'::vector::sparsevec) FROM tst");
|
||||
is($expected, $actual, $function);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user