Updated formatting [skip ci]

This commit is contained in:
Andrew Kane
2024-07-27 08:25:09 -07:00
parent 6c692ef23f
commit 8684c2ba62
2 changed files with 23 additions and 19 deletions

View File

@@ -53,7 +53,7 @@ sub test_aggregate
else else
{ {
# Does not raise overflow error in this instance due to loss of precision # Does not raise overflow error in this instance due to loss of precision
is($res, "[24576,24576,49152]") is($res, "[24576,24576,49152]");
} }
} }

View File

@@ -14,13 +14,17 @@ $node->safe_psql("postgres", "CREATE EXTENSION vector;");
$node->safe_psql("postgres", "CREATE TABLE tst (i serial, v sparsevec(100000));"); $node->safe_psql("postgres", "CREATE TABLE tst (i serial, v sparsevec(100000));");
$node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v sparsevec_l2_ops);"); $node->safe_psql("postgres", "CREATE INDEX ON tst USING hnsw (v sparsevec_l2_ops);");
for (1 .. 3) { for (1 .. 3)
for (1 .. 100) { {
for (1 .. 100)
{
my @elements; my @elements;
my %indices; my %indices;
for (1 .. int(rand() * 100)) { for (1 .. int(rand() * 100))
{
my $index = int(rand() * (100000 - 1)) + 1; my $index = int(rand() * (100000 - 1)) + 1;
if (!exists($indices{$index})) { if (!exists($indices{$index}))
{
my $value = rand(); my $value = rand();
push(@elements, "$index:$value"); push(@elements, "$index:$value");
$indices{$index} = 1; $indices{$index} = 1;