Skip to content

Commit

Permalink
Fixed Warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Chitti-Ankith committed Apr 11, 2024
1 parent 48d9e8f commit 2b34bcc
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions src/pinecone/pinecone_build.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,18 @@ IndexBuildResult *pinecone_build(Relation heap, Relation index, IndexInfo *index
PineconeOptions *opts = (PineconeOptions *) index->rd_options;
IndexBuildResult *result = palloc(sizeof(IndexBuildResult));
VectorMetric metric = get_opclass_metric(index);
// Log spec.
pinecone_spec_validator(opts);
const char* spec = GET_STRING_RELOPTION(opts, spec);
cJSON* spec_json = cJSON_Parse(GET_STRING_RELOPTION(opts, spec));
int dimensions = TupleDescAttr(index->rd_att, 0)->atttypmod;
char* pinecone_index_name = get_pinecone_index_name(index);
char* host = GET_STRING_RELOPTION(opts, host);

cJSON* spec_json;
char* pinecone_index_name;
char* host;
int dimensions;
cJSON* describe_index_response;

pinecone_spec_validator(opts);
spec_json = cJSON_Parse(GET_STRING_RELOPTION(opts, spec));
dimensions = TupleDescAttr(index->rd_att, 0)->atttypmod;
pinecone_index_name = get_pinecone_index_name(index);
host = GET_STRING_RELOPTION(opts, host);
validate_api_key();

// if the host is specified, check that it is empty
Expand Down

0 comments on commit 2b34bcc

Please sign in to comment.