mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-11 23:26:55 +08:00
Added aggregate test for halfvec [skip ci]
This commit is contained in:
@@ -41,6 +41,15 @@ sub test_aggregate
|
|||||||
# Test explain
|
# Test explain
|
||||||
my $explain = $node->safe_psql("postgres", "EXPLAIN SELECT $agg(v) FROM tst;");
|
my $explain = $node->safe_psql("postgres", "EXPLAIN SELECT $agg(v) FROM tst;");
|
||||||
like($explain, qr/Partial Aggregate/);
|
like($explain, qr/Partial Aggregate/);
|
||||||
|
|
||||||
|
# Test halfvec
|
||||||
|
$res = $node->safe_psql("postgres", "SELECT $agg(v::halfvec) FROM tst;");
|
||||||
|
if ($agg eq 'avg')
|
||||||
|
{
|
||||||
|
like($res, qr/\[1\.5/);
|
||||||
|
like($res, qr/,2\.5/);
|
||||||
|
like($res, qr/,3\.5/);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
test_aggregate('avg');
|
test_aggregate('avg');
|
||||||
|
|||||||
Reference in New Issue
Block a user