From 98e2dba136dbe9e41d70d58ba7e08621b7a507ef Mon Sep 17 00:00:00 2001 From: Sweta Vooda Date: Fri, 19 Apr 2024 15:48:07 +0000 Subject: [PATCH] supress warn to fix workflow build error --- README.md | 6 ++++++ src/pinecone/pinecone_validate.c | 7 ++++--- test/sql/pinecone_invalid_config.sql | 2 +- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 26d6aa60..6b6e750a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # pgvector-remote +[introduction](https://medium.com/@sweta.vooda/pgvector-remote-a-pgvector-fork-with-the-performance-of-pinecone-5d8a7f6a50bd) + pgvector-remote is a fork of pgvector which combines the simplicity of [pgvector](https://github.com/pgvector/pgvector) with the power of remote vector databases, by introducing a new remote vector index type. Currently, pgvector-remote only supports [pinecone]("https://www.pinecone.io/") , but we plan to support other vendors in the future. @@ -12,6 +14,10 @@ with the power of remote vector databases, by introducing a new remote vector in - [Docker](#docker) - [Credits](#credits) + +![image](https://github.com/georgia-tech-db/pgvector-remote/assets/66109536/707eb52e-50f5-4675-8e66-d0a97066afd0) +*Benchmarks for a 10M filtered search workload. https://big-ann-benchmarks.com/neurips23.html#tracks. Results for pgvector are shown for a tuned hnsw index on a t2.2xlarge (32GB RAM). Results for pinecone are for a p2.x8 pod.* + ## Short Version ```sql diff --git a/src/pinecone/pinecone_validate.c b/src/pinecone/pinecone_validate.c index 3bfbe961..893c8d09 100644 --- a/src/pinecone/pinecone_validate.c +++ b/src/pinecone/pinecone_validate.c @@ -20,10 +20,10 @@ void validate_vector_nonzero(Vector* vector) { } } - +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnonnull" void pinecone_spec_validator(const PineconeOptions *opts) { - const char* spec_str = GET_STRING_RELOPTION(opts, spec); - if (opts == NULL || cJSON_Parse(spec_str) == NULL || (spec_str != NULL && strcmp(spec_str, "") == 0)){ + if (opts == NULL || cJSON_Parse(GET_STRING_RELOPTION(opts, spec)) == NULL || strcmp(GET_STRING_RELOPTION(opts, spec), "") == 0) { ereport(ERROR, (errcode(ERRCODE_INVALID_PARAMETER_VALUE), errmsg("Invalid spec"), @@ -31,6 +31,7 @@ void pinecone_spec_validator(const PineconeOptions *opts) { Refer to https://docs.pinecone.io/reference/create_index"))); } } +#pragma GCC diagnostic pop void pinecone_host_validator(const char *host) { diff --git a/test/sql/pinecone_invalid_config.sql b/test/sql/pinecone_invalid_config.sql index 2a97dde4..bbbe4a04 100644 --- a/test/sql/pinecone_invalid_config.sql +++ b/test/sql/pinecone_invalid_config.sql @@ -1,6 +1,6 @@ SET enable_seqscan = off; SET client_min_messages = 'notice'; -ALTER SYSTEM RESET pinecone.api_key; +ALTER SYSTEM SET pinecone.api_key = ''; SELECT pg_reload_conf(); CREATE TABLE t (val vector(3)); CREATE INDEX i2 ON t USING pinecone (val) WITH (spec = '{"serverless":{"cloud":"aws","region":"us-west-2"}}');