Skip to content

Commit

Permalink
supress warn to fix workflow build error
Browse files Browse the repository at this point in the history
  • Loading branch information
swetavooda committed Apr 19, 2024
1 parent d65c3f3 commit 98e2dba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions src/pinecone/pinecone_validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,18 @@ 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"),
errhint("Spec should be a valid JSON object e.g. WITH (spec='{\"serverless\":{\"cloud\":\"aws\",\"region\":\"us-west-2\"}}').\n \
Refer to https://docs.pinecone.io/reference/create_index")));
}
}
#pragma GCC diagnostic pop

void pinecone_host_validator(const char *host)
{
Expand Down
2 changes: 1 addition & 1 deletion test/sql/pinecone_invalid_config.sql
Original file line number Diff line number Diff line change
@@ -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"}}');
Expand Down

0 comments on commit 98e2dba

Please sign in to comment.